A Cave Story tribute C++ game.
The entire game was build from the ground up using a Box2D based game engine provided by the school and free graphic assets from Kenney.nl.
The challenge for this project was to keep the code readable, simple in design and
maintainable. The use of various intermediate and advanced C++ topics like inheritance and polymorphism was also a basic requirement.
Visual Studio 2013, Adobe Photoshop, Tiled and Bfxr.
Each enemy type in the game inherits from a base class called "Actor".
// Reset the camera on button press, this resets the camera to it's initial rotation and zoom state.
void EnemySlowpoke::BeginContact(PhysicsActor *actThisPtr, PhysicsActor *actOtherPtr)
int damage = 3;
// DAMAGE PLAYER
if (actThisPtr == m_ActPtr &&
actOtherPtr == m_ActPlayerPtr->GetActor())
// FLIP ON WALL/LEVEL HIT
if (m_ActWallPtr->IsOverlapping(m_LevelPtr) && !m_HitWall)
m_WaitTime = WAIT_TIME;
m_HitWall = true;
if (actThisPtr == m_ActPtr && actOtherPtr->GetCollisionFilter()
.categoryBits == CaveStory::FilterCategory::ENEMY)
// DAMAGE SELF IF HIT BY BULLET
if (actOtherPtr->GetCollisionFilter().categoryBits ==