© Sloan Kelly  2019
Sloan KellyPython, PyGame, and Raspberry Pi Game Developmenthttps://doi.org/10.1007/978-1-4842-4533-0_17

17. Model View Controller

Sloan Kelly1 
(1)
Niagara Falls, ON, Canada
 
Model View Controller was mentioned before in the “Designing Your Game” section to describe how the interactions between different objects can be used to simplify the problem: breaking down a bigger problem into smaller easier-to-manage chunks. See Figure 17-1.
../images/435550_2_En_17_Chapter/435550_2_En_17_Fig1_HTML.png
Figure 17-1

Model View Controller design pattern

Model

The model represents the data or attributes associated with the object. For example, a player has a position in space, lives, shield strength, and score. ...

Get Python, PyGame, and Raspberry Pi Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.