Differences between map and model data
There are some interesting differences between handling models and level data, allowing us to apply optimizations in data handling. In the code for this book, we will do these optimizations after loading the level data. For larger levels, doing a precalculation during level creation is the better approach.
Let’s take a closer look at some of the differences.
Level data does not move around
The most significant difference between models and levels is simple: while the properties of a model instance can change, such as position, rotation, and speed, and they play animations, react to events, and so on, a level’s architecture typically remains unchanged.
Non-movable and non-animated polygons of a level have a big advantage: some data can be precalculated, either at creation time or at loading time for collision detection or lighting, for example. At runtime, only a lookup into the precalculated data is needed. Plus...