4 ms·
I assume, given the headings there, it talks about Model/View/Controller as the way to organise a game (and an application as a whole)? If you’re interested in
by OnlyMortal 3y ago
I assume, given the headings there, it talks about Model/View/Controller as the way to organise a game (and an application as a whole)?
If you’re interested in how to put a game together, MVC is an obvious model to follow.
For those who don’t understand what I mean, you firstly worry about data and have a way to represent that. That data only been the “actors” state and position in the game. Nothing graphics related. Nothing to do with how they interact. This is the “model”.
You then have completely separate code that can move those actors around by changing the values in the model. This will include state changes like collisions. No graphics involved.
You then have separate code that draws the actors in the model based on their state.
It isn’t obvious to many but this allows you to concentrate on the various areas that need coding. It also allows you to, say, easily change parts of the code as needs be.