Continuing with Performance Improvements


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.

Get Worlds - History Simulator

Comments

Log in with itch.io to leave a comment.

(2 edits)

Just reading these devlogs makes me want to learn Unity coding in order to perhaps help you a little bit with this game. Too bad my laptop isn't built very well for programming ^^'

And also, could I make a suggestion? If there isn't a mechanic like that yet, could you implement a mechanic so that you can still add unorganized bands on a cell even if you already put them on the beggining? Just so that I can populate continents that weren't sailed to and colonized.

In fact I almost implemented the ability to place multiple initial populations. Though I didn't complete it because I want to wait to do an editor focused update. My goal with that update will be to allow full mid-game editing. So you will be able to stop the simulation at any point and do things like adding/removing groups, change cultures, add discoveries, and even customize polities. Of course I have no idea when I'll get to work on that : /

Don't worry. You can always play around with the game mod files and add mods of your own. That's a way of cooperating too :)

(+1)

I need to say but I'm very excited to see where this game is going

Thanks!