Summary
In this chapter, we added static level data to the virtual world. After exploring the differences between level maps and models, we looked at suitable file formats for level data and how to find cool game maps. Then, we added support for level data to the application and replaced the quadtree with an octree to support collision detection in three dimensions. Finally, we added the new level data and a level AABB to the renderer. We will extend the level data in the next two chapters to create a virtual world where the instances can roam around freely and by themselves.
In the next chapter, we will continue the collision detection from Chapter 8. First, we will extend the existing code to support collisions between instances and the level geometry. To ensure the instances are always on the ground, we will introduce gravity in the virtual world. As the last step, we add inverse kinematics to the legs of the instances, allowing the model to climb stairs or slopes with natural...