HomeWildfire Games

Survival Of The Fittest Overhaul
AuditedrP19359

Description

Survival Of The Fittest Overhaul

Exponential attacker increase to prevent boring endless games.
Add a gaia hero per player at later stages of the game (if the previous one isn't alive anymore).
Remove hardcoded template array and include gimmick templates (gaia), most notably the fireraiser which we never saw before and the siege tower.
Remove treasure picker female after defeat to prevent confusion with treasure on the minimap.
Add flag to the spawnpoints, so that new players know where the enemies actually come from, as proposed by bbleft and Hannibal Barca.
Move all balancing constants to the top of the file.
Actively chose attacker composition instead of having it relate to the number of templates that exist.
Add debug output option, so that we can replay games and see which enemy wave composition attacked at which time.
Add dry run, so that we can test the balancing effects from a non-visual replay instead of having to play some game.
Remove many unused variables and some pointless tile classes from the mapgen.
Whitespace and various code style cleanup, moving code to shorter, more readable functions.

Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D145

Event Timeline

bb raised a concern with this commit.Mar 29 2017, 11:17 PM
bb added a subscriber: bb.

While testing the map in an svn game, we got an error after the match was won:

ERROR: CRenderer::EndFrame: GL errors 1281 occurred
ERROR: Error in timer on entity 1, IID90, function DoAction: TypeError: Engine.QueryInterface(...) is null
  Trigger.prototype.StartAnEnemyWave@maps/random/survivalofthefittest_triggers.js:283:19
  Trigger.prototype.DoAction@simulation/components/Trigger.js:303:3
  Timer.prototype.OnUpdate@simulation/components/Timer.js:120:4

The error is triggered because after the match is won, new waves will pop up and these can destroy the survivor's cc and thus the playerCivicCenter array gets empty with an OnOwnershipChange. After his cc is destroyed the player won't be defeated (since he has won) so his units stay alive (especially the treasure woman). So cmpPlayer.GetPlayerID() == 0 is false for the survivor. But he doesn't have a cc so this.playerCivicCenter[cmpPlayer.GetPlayerID()] does not exist and so triggers an error. This could be solved by either: don't spawn new waves after win, or check for the existence of the playerCC to spawn a wave for him. (I did prefer the second approach since hen we allow players to test there strategy also in SP, without cheating the ai.)

This commit now has outstanding concerns.Mar 29 2017, 11:17 PM
elexis requested verification of this commit.Apr 3 2017, 1:45 AM

Fixed by D275 / rP19368 (could also leave this open until the typo in there is fixed)

This commit now requires verification by auditors.Apr 3 2017, 1:45 AM
bb accepted this commit.Apr 3 2017, 2:07 PM

Error resolved in rP19368

All concerns with this commit have now been addressed.Apr 3 2017, 2:07 PM
elexis added inline comments.Mar 5 2018, 3:15 PM
/ps/trunk/binaries/data/mods/public/maps/random/survivalofthefittest.js
214

Previously the forest was created after the hills, now it's the reverse and trees are placed on top of hills.
I wonder how we never noticed.