Incorporating Collision Detection
In the context of 2D video games, the fundamentals of a physical simulation involves movements of rigid shapes, collisions of the moving shapes, and responses after the collisions. In the previous chapter, you defined the rigid shape classes and a core engine loop to support basic drawing, update operations, and simple movements of rigid shapes. In this chapter, you will learn about and implement the detection of rigid shape collisions and compute the necessary information, such that in the next chapter you can begin resolving and implementing implement the responses to the collisions. The proper implementation based on these concepts enables believable scenarios when objects physically interact with each other in the simulated world.