itch.io is community of indie game creators and players

Devlogs

Continuing with Performance Improvements

Worlds - History Simulator
A downloadable game for Windows and macOS

Last week I fully converted the "Foster Relationship" Decision from hardcoded to scripted, while also revising its trigger conditions, and managed to improve the performance of the game quite a bit. As seen here:

The revamped event that launches the decision now appears as 'tribe_decide_fostering_relationship', which now triggers 100% of the time (as opposed to 0%), and only gets evaluated ~200 times per second, which is better than ~3000 times per second. The world was progressing at a decent ~3000 years per second, which is quite an improvement over the ~100 years per second before the change, even taking into account that the screenshot was taken with a world in a much more progressed state than that of last week. 

Still, the game slows downs considerably over time, and eventually, it will start running ad 200~300 if left to run for another 5 minutes or so. This is mostly due to two decision events that are misbehaving: TribeSplitDecisionEvent and MergeTribesDecisionEvent. From the screenshot, you can see that both are evaluated very frequently but with near 0% trigger rates. They, together, account for >60% of all evaluated events per second, which is very bad considering those should be events that occur very rarely.

So I decided to continue working on improving the simulation performance by converting first the tribe split decision and then the merge tribe one. This is probably going to take another two or three weeks. But, hopefully, after that I'll get much better performance. Which is going to be necessary for me to properly continue working on tribal migrations and aggression.

Download Worlds - History Simulator
Read comments (4)