Im working on a history simulation game that aims to simulate hundreds of states, and hundreds of thousands of pops (People in a population with similar traits). Ive run into performance issues early on with unity predictably struggling to handle updating 750k classes each tick. However, I’m still relatively new to the engine and I dont fully understand ECS and Dots but from what I do know it seems like I need to rewrite the whole game to fully use the performance boosts. Can anyone offer some insight? Thanks
Yeah, this sounds very much like something where you just need to use DOTS. Or at the very least a much more data-oriented design (one component instance with one Update method and an array of state structs, instead of 750k separate component instances each with their own Update methods and states).
Generally, simulations aim for 100% accuracy in the data space, while games aim to create an enjoyable experience in a performant way.
These two aims are in tension with each other, and in tension with the real world limits of computing.
Almost without exception, games are Potemkin Villages., not true simulations.
ECS lets you do certain things better, at the expense of other things.
Your job is to find the middle ground that solves your specific problem well.
You would need to rewrite whatever portions are worth rewriting, again an engineering decision that is tightly coupled to what you’re actually aiming to achieve.