© Michael Tanaya, HuaMing Chen, Jebediah Pavleas and Kelvin Sung 2017

Michael Tanaya, Huaming Chen, Jebediah Pavleas and Kelvin Sung, Building a 2D Game Physics Engine, 10.1007/978-1-4842-2583-7_3

3. Incorporating Collision Detection

Michael Tanaya, Huaming Chen1, Jebediah Pavleas2 and Kelvin Sung3

(1)Bothell, Washington, USA

(2)Kenmore, Washington, USA

(3)Woodinville, Washington, USA

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 ...

Get Building a 2D Game Physics Engine: Using HTML5 and JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.