Performance note

There seems to be a performance problem as you near the end of the game. If you then start another game from the main menu, the bad performance continues into the next game. I have a theory as to why this is, but I'm on a break from dam builder code for a short while, and it wouldn't help the final entry anyway.

I would request reviewers that want to play more than one game to restart the whole app after each game you played, however. Thanks!

(log in to comment)

Comments

I couldn't resist looking. I've fixed a rather bad performance problem in the later game stages with a 1 line fix that I wouldn't want to withhold from anyone. Add a line saying "leak.clear_ode()" just below line 78 in src/dambuilder/dam.py (in the "if leak.rate < 0" block).