Final project for Object-Oriented Programming — my first programming course at university. This was my first real project beyond classroom practice exercises.
A 2D fighting game built in C++ with SFML featuring:
- Main menu (New Game / Options / Quit)
- Character selection
- HUD / health bars, rounds, and sound effects
- Animated sprites (idle, walk, attack, jump, get hit, win/lose)
- Music/SFX for menus and battles
The core learning goals were practicing classes, encapsulation, state/scene management, and resource loading (images, fonts, audio) in a graphical application.
- Language: C++17
- Library: SFML 2.5+ (graphics, window, system, audio)
- Build system: CMake
- Recommended IDE: Visual Studio Code (with CMake Tools)
Ubuntu/Debian setup:
sudo apt update
sudo apt install -y build-essential cmake gdb libsfml-dev.
├─ assets/
│ ├─ audio/
│ │ ├─ music/
│ │ └─ sfx/
│ ├─ backgrounds/
│ ├─ fonts/
│ ├─ sprites/
│ └─ data/ # .poo / .txt files for persisted state
├─ include/
│ ├─ Assets.h # path helper: asset("subfolder/file")
│ └─ … # game headers
├─ src/ # game sources
├─ .vscode/ # F5 run/debug config (optional)
├─ CMakeLists.txt
└─ README.md
The game uses
include/Assets.hto load resources fromassets/.... At runtime, CMake copiesassets/intobuild/assets, so relative paths work when running frombuild/.
- Install extensions: C/C++, CMake, CMake Tools.
- Open the repo folder in VS Code and trust the workspace.
- Bottom status bar: Select a Kit → GCC.
- Configure → Build.
- Run and Debug → Run TheFightingGame (GDB) → F5.
# from the project root
mkdir -p build
cd build
cmake ..
cmake --build .
./TheFightingGameControls are shown in-game (Options menu) and/or in assets/data/Menu_Referencia_Botones.txt.
Note: some bindings are read/written under
assets/data/*.poo.
The game reads/writes data under assets/data/:
Controles_p1.poo,Controles_p2.poo(per-player controls)Historial.poo(results/history)InfoPublicaJugadores.txt(values shown on screen)
Files are created automatically if missing.
This repository preserves the original logic from my first-year OOP final project, with only minimal organization to build and run smoothly today:
- Folder layout (
assets/,src/,include/) - CMake + VS Code configuration
- Asset path helper (
Assets.h) - Safe handling of data files (auto-create if missing)
Academic, non-commercial project. Some assets (images/fonts/audio) may be third-party and are used for educational/demo purposes only.



