Skip to content

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Platformer Prototype

This repository provides a scaffold for a 2D platformer built in modern C++ using SDL2. The demo now features a controllable player, scrolling level, and basic physics.

Directory Structure

  • src/
    • engine/ – core engine systems (application, renderer, etc.).
    • game/ – gameplay code such as scenes, entities, and physics.
    • CMakeLists.txt – build rules for the executable.
  • assets/
    • tilesets/ – tile graphics.
    • levels/ – level data (level1.csv, level2.csv, and level3.csv).
    • sprites/ – character and object sprites.
  • external/ – optional third‑party dependencies.
  • tests/ – placeholder for unit tests.
  • CMakeLists.txt – top‑level build configuration.

Build Instructions

Ensure SDL2 is installed on your system. Image and TTF support are optional and will be enabled automatically if the development packages are available. On Debian/Ubuntu:

sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev

Then build the demo:

cmake -S . -B build
cmake --build build
./build/src/platformer

The executable is placed under build/src/. Running it creates an 800×600 window with a side‑scrolling level. Use A/D to move, SPACE to jump (with a double jump), and hold Left Shift to sprint. Press 1, 2, or 3 at any time to load the corresponding level.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages