I am making a 2d block based sandbox game like terraria.
I'm trying to think where is the better place to store water in, data structure wise.
That is, to store it in the block world array, or to store it in its own sparse data structure. Does doing this have any benefits?
If I store it in the world array I have to store the fluid level (which would be like 16 levels possible). The other way I could simply have a fluid cell struct or something.
It might make things more clear separating it, but not sure if it would possibly affect performance either way.
In a game like this, the simulation is of course usually done via cellular automata (just in case that affects which data structuring I should use)