Wrote an update

This commit is contained in:
2019-06-10 19:35:34 +10:00
parent 83d7486a43
commit 5a316fb649
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
Ladder Update And Server Fires
---
_10 June 2019_
I've updated the ladder code tonight, and the server caught fire (figuratively). I had a lot of hotfixing to do, but it's resolved now. There is a new ordering system in place, but I'm still tweaking the equasion - right now, unit count, successful battles and gold all contribute to your ranking. Soon I'm going to add the ability to sort by other means, but for now this is OK.
Now, I need to discuss something else - the pressure I've suddenly found myself under with this game.
I started writing this game just for fun, and I'd really like to go back to doing that - adding features if I think they'll be fun. I don't want to add things that don't align with my vision, especially if they hurt the game overall. I'm a one man show at the moment, so I'm going to need patience from the playerbase if something goes wrong, or if there's something you want added to the game. Remember: I have 15 years of game development experience under my belt - trust that I know what I'm doing, and please don't hound me.
+1 -1
View File
@@ -516,7 +516,7 @@ const runGoldTick = (connection) => {
const runLadderTick = (connection) => {
let ladderTickJob = new CronJob('0 * * * * *', () => {
//set the ladder rank weight
let query = 'UPDATE profiles SET ladderRankWeight = ((recruits + soldiers + scientists + spies) + (SELECT COUNT(*) FROM pastCombat WHERE (attackerId = accountId AND victor = "attacker") OR (defenderId = accountId AND victor = "defender")) / 10 + gold / 100);';
let query = 'UPDATE profiles SET ladderRankWeight = ((recruits + soldiers + scientists + spies) + (SELECT COUNT(*) FROM pastCombat WHERE (attackerId = accountId AND victor = "attacker") OR (defenderId = accountId AND victor = "defender")) / 30 + gold / 100);';
connection.query(query, (err) => {
if (err) throw err;