Episode 52.2 - Reconstructing Cave Story: Implementing Collision Rectangle

371 views · Published 7 March 2014 · 18:25 · Indexed 30 September 2026

Channel: Christopher Hebert · 2014 · Education

Watch on YouTube

Part 2 / 4
Part 1: http://www.youtube.com/watch?v=IzmqW-EMT8U&feature=share&list=PL006xsVEsbKjSKBmLu1clo85yLrwjY67X&index=62

https://github.com/chebert/cavestory-screencast

In this part, we take care of steps 3-4, creating/using CollisionRectangle.

0:00 3 - Create CollisionRectangle Struct
6:54 4 - Player uses CollisionRectangle
10:08 3 - Create CollisionRectangle Struct
6:54 4 - Player uses CollisionRectangle

Implementation Plan:
1 - Create Kinematics
2 - Player uses kinematics_x_, kinematics_y_
3 - Create CollisionRectangle
4 - Player uses CollisionRectangle
5 - implement onCollision/onDelta in Player class
6 - move collision code into MapCollidable object, have player implement.

=================================================
Playlist:
https://www.youtube.com/playlist?list=PL006xsVEsbKjSKBmLu1clo85yLrwjY67X

Content (.bmp files and such):
https://github.com/chebert/cavestory-content/archive/master.zip

Cave Story (freeware version) download page: http://www.cavestory.org/downloads_game.php

More from this channel