Skip to content

bramtechs/DAE-Programming2

Repository files navigation


Cave Story+

Cave Story+ is an enhanced commercial version of the original CaveStory. Cave Story is a 2004 Metroidvania game. It was developed over five years by Japanese independent developer Daisuke "Pixel" Amaya in his free time. It blends tight shooting mechanics, nonlinear exploration, and multiple endings in a retro pixel-art world inspired by classic 8- and 16-bit games.
Original game : General info » · Youtube video »

Table of Contents
  1. About The Project
  2. My version
  3. Getting Started
  4. How To Play
  5. Class structure
  6. Checklist
  7. Contact
  8. Acknowledgments

About The Project

alt text Here's why:

  • It is a remaster of a classic indie game with a passionate fanbase I somehow haven't gotten around to play earlier.
  • The game high variety of worlds with lively and rich characters.
  • Focused and strong core gameplay loop.
  • I think it serves great for learning how to program platformers.

(back to top)

My version

This section gives a clear and detailed overview of which parts of the original game I planned to make.

The minimum I will most certainly develop:

  • Overlay first cave level as a texture and lay-out collision shapes.
  • Player with horizontal movement, jumping, and basic air control
  • Collision detection between player
  • Camera that follows player within level bounds
  • Rendering the player sprite and animation states (idle, run, jump)
  • Basic enemy entity with position and simple movement pattern
  • Player projectile system (spawn bullet, movement, lifetime)
  • Collision detection between bullets and enemies
  • Enemy damage, hit feedback, and removal on defeat
  • Player damage on enemy contact
  • Basic HUD showing player health
  • Beginning of Mimiga Village area layout
  • Trigger zone that stops player and opens dialog
  • Dialog box UI with text rendering
  • Input handling to advance dialog text
  • Camera lock during dialog events

What I will probably make as well:

  • Save station entity placed in first level
  • Interaction key to activate save station
  • Save system storing player position and health
  • Boss entity with larger sprite
  • Boss attack patterns (movement phases)
  • Boss health display
  • Boss defeat event triggering dialog or transition
  • Transition between cave level and Mimiga Village
  • NPC entity system for characters in village
  • NPC interaction trigger and dialog events

What I plan to create if I have enough time left:

  • Smaller details like particles
  • Full Mimiga Village map layout
  • Multiple NPCs with multiple dialog lines

(back to top)

Getting Started

Prerequisites

  • Visual Studio 2022
  • "Desktop development with C++" workload installed through Visual Studio Installer

How to run the project

The game project is called CaveStoryPlus, right click it and set as "Set as Startup Project". If not already: ensure that CaveStoryPlus has the Engine project set as a project build dependency.

(back to top)

How to play

You start of in the Cave level. Use the arrow keys and Z to move to the left side of the screen. Make sure to avoid the various spikes and enemies!

On the left you will see a Life Capsule. You can pick it up by pressing arrow Down. Then press X to read through the dialog message.

On the bottom right of the map you will find the Gunsmith building where you can collect the Polar Star gun.

Make your way to the top-right of the level, after defeating the enemies in your way you can go throught he door to the next level.

In the second level: you have access to the Reservoir on the left and the Boss Room on the far bottom right. There are NPCs and objects to interact with.

Controls

  • Left and Right arrow keys to move around.
  • Down arrow to interact with NPC, objects and going through doors.
  • Z key to Jump.
  • X key to shoot and read through dialog.

(back to top)

Class structure

Object composition

The Player object owns a pointer to child class object of Weapon and its Texturesheet. The Player class also has non-owning reference to the DialogManager and SoundManager, but does own a PlayerGUI object.

An object of Level class contains a non owning pointer to the SpriteSheetManager. It also owns a BulletManager among various std::vectors containing objects in the game.

A BossEnemy object holds a BarWidget as a field or component.

Inheritance

All interactable things in the game inherit from the base abstract class Interactable: for example DoorInteractable, GoldInteractable and ChestInteractable.

There is also a DecorInteractable class that provides shared code for its children classes (NPCs).

The DialogEvent abstract base class is inherited by a lot of classes: (GiveHealthDialogEvent, RespawnDialogEvent, SpawnBossDialogEvent, ...) to allow logic to happen whenever the player read through a certain DialogMessage.

Managers

There are many managers that handle the different systems of the game, like: BulletManager, SpriteSheetManager, SoundManager, MusicManager, DialogManager, ...

(back to top)

Checklist

  • Accept / set up github project
  • week 01 topics applied
    • const keyword applied proactively (variables, functions,..)
    • static keyword applied proactively (class variables, static functions,..)
    • object composition (optional)
  • week 02 topics applied
    • Use of transformations: BossEnemy, Bullet, Camera, PolarStar
    • Use of Manager classes: BulletManager, TextManager, DialogManager, ...
  • week 03 topics applied
    • Apply OO principles: Data members, Accessors, Mutators, Behavior
    • Seperate .h from implementation .cpp
    • Classes with constructors to prevent invariant states.
  • week 04 topics applied
    • Use of class forwarding in headers when possible over including headers. Prevent cylic dependencies with forward declaration.
    • object composition
    • Implementation of platforms. Collision between player and platforms.
  • week 05 topics applied
    • Single responsibility principle
    • Class relationships: composition, aggregation, association, inheritance
    • Delegating constructors to avoid duplicate code (see Interactable .cpp file)
    • Use of inheritance (see Class structure above)
  • week 06 topics applied
    • Polymorphism
    • C++ style casting (used static_cast)
    • Use of (pure) virtual (see Interactable class)
    • Camera (object space, world space, camera space)
    • Sound
    • Music
  • week 07 topics applied
    • friend keyword (see Level class)
    • operator overloading (see Level class)
    • use explicit keyword for constructors
  • week 08 topics applied
    • Copy semantics, Rule of 3
  • week 09 topics applied
    • prevent object slicing
    • use lvalue reference when needed
  • week 10 topics applied
    • Move semantics, Rule of 5
  • week 11 topics applied (optional)
    • Streams

(back to top)

Contact

Bram Deraeve - bram.deraeve@student.howest.be

Project Link: https://github.com/HowestDAE/gd25-bramderaeve

(back to top)

Acknowledgments

(back to top)

About

Recreated slice of Cave Story+ for final course project.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages