From 5a316fb6499c2b3d76187954350e860501e40d8e Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Mon, 10 Jun 2019 19:35:34 +1000 Subject: [PATCH] Wrote an update --- public/news/2019-06-10-01.md | 10 ++++++++++ server/profiles.js | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 public/news/2019-06-10-01.md diff --git a/public/news/2019-06-10-01.md b/public/news/2019-06-10-01.md new file mode 100644 index 0000000..77d4fc2 --- /dev/null +++ b/public/news/2019-06-10-01.md @@ -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. + diff --git a/server/profiles.js b/server/profiles.js index b169cb9..23ab191 100644 --- a/server/profiles.js +++ b/server/profiles.js @@ -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;