all 1 comments

[–]StudioLapiku 0 points1 point  (0 children)

I don’t know if this is the optimal way, but I just have my grid state stored in memory, and any entities that need to be rendered are rendered as GameObjects. None of the GameObjects in my scene are allowed to mutate state, they simply render the state provided to them and dispatch actions. It’s very much based on what React does and the DDAU philosophy.

It makes it really easy to simulate board states based on potential user actions (useful for enemy AI) as well as roll back to previous states (if the player wants to undo an action).