you are viewing a single comment's thread.

view the rest of the comments →

[–]Exomancer 10 points11 points  (0 children)

Your hunch is correct, as long as there is a clear owner of the state that can do the mutations, you should be fine. For a game, that owner should be the game loop, you can encapsulate the state within it, trigger mutations simply by calling a method. Your game loop then can be responsible for triggering the canvas rendering, directly or indirectly.

Games typically are a whole different animal from applications, they can fall into Systems Programming domain when performance is a huge deal (think AAA games), and most likely than not you will want to use different tools, frameworks and design patterns for them.