I’m really happy that I was able to fix the performance issues that had been creeping into the game. It now runs at a steady 60 FPS even on my 10-year-old laptop. I added lots of performance measuring in the last release, and that combined with having all the old releases available made it possible to track down exactly the source of the slow-down. It turned out to be something totally unexpected — the text rendering.
As long as I don’t update the text on the screen more than a few times per second, performance is great. Before, I was updating it on every tick. This prompted me to do something I’ve been needing to do anyway, which is to separate things that need to be done on every tick from things that don’t. Text rendering, for example, can happen 3 times per second. I scaled collision testing back to about 20 times per second, as well, since it’s fairly expensive.
It’s running great and I’m really relieved. Give it a try here.