Version 1.0.3 · Changelog
A 2D platformer in C++17 using SFML 2.x. Play an eight-level campaign (short tutorial, extended late levels, L8 boss arena), collect coins and secret stars, triple-jump, shoot, avoid lava, enemies, and a final boss with multi-phase attacks. Features checkpoints, a shield bubble, SFX, longer CC0 music loops, and per-level parallax. Main menu, pause, volume options, Top 10, and scores.json.
Current game state (August 2026) — lava, shields, stars, boss:
| Level 1 — forest | Level 2 — desert |
|---|---|
![]() |
![]() |
| Level 3 — castle | Level 4 — night / boss |
|---|---|
![]() |
![]() |
| YOU WIN — name entry |
|---|
![]() |
- C++17
- CMake >= 3.20
- SFML 2.5+ (branch 2.x — not 3.x)
brew install sfmlsudo apt install libsfml-dev
CMakeLists.txthas hardcoded paths and expects vcpkg at exactlyC:\game2d\vcpkg, with SFML inC:\game2d\vcpkg\vcpkg_installed\x64-windows. The steps below create exactly that layout, so the project builds without editingCMakeLists.txt.
1. Install the tools. Install Visual Studio 2022 with the "Desktop development with C++" workload (provides the MSVC compiler, CMake and Ninja) and Git for Windows.
2. Open the developer console. From the Start menu launch "Developer
Command Prompt for VS 2022" (the compiler is already on PATH).
3. Install vcpkg and SFML exactly in C:\game2d\vcpkg:
git clone https://github.com/microsoft/vcpkg C:\game2d\vcpkg
cd C:\game2d\vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg install sfml:x64-windows4. Create the vcpkg_installed junction required by CMakeLists.txt
(classic vcpkg installs into installed\, but the project looks in
vcpkg_installed\):
mklink /J C:\game2d\vcpkg\vcpkg_installed C:\game2d\vcpkg\installed5. Build the game (from the project directory):
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=C:\game2d\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake --build build --config ReleaseAfter building, CMake automatically copies the assets/ folder and the required
SFML DLLs next to the .exe.
6. Run the game:
cd build\Release
Platformer.exemkdir build
cd build
cmake ..
cmake --build .Executable: Platformer (Windows: Platformer.exe).
The assets/ folder is copied automatically to the binary directory after each build.
cd build
./Platformer # macOS / Linux| Key / action | Description |
|---|---|
↑ / ↓ |
Navigate menu options |
| Mouse move | Highlight option under cursor |
Enter / LMB |
Select option |
| Key | Action |
|---|---|
A / ← |
Move left |
D / → |
Move right |
↑ |
Jump (up to 3× in the air) |
Space |
Shoot (horizontal projectile, cooldown) |
Escape |
Pause (Resume / Options / Menu / Quit) |
| Key | Action |
|---|---|
R |
Instant restart (Game Over) |
Escape |
Return to menu (Game Over) |
Enter |
Confirm name after winning → back to menu |
- Starts at the main menu with animated parallax.
- Campaign: 4 levels — clear all coins to advance; after level 4, win screen.
- 3 lives — falling off-map, lava, or enemy/projectile hits cost a life (shield absorbs one enemy/projectile hit; does not protect from lava or pits).
- Checkpoints soft-save position (pickups and kills stay).
- Shield bubble pickups; active shield shows around the player and as
[SHIELD]in the HUD. - Stars — optional secrets counted in the HUD.
- Enemies patrol and shoot only when facing you. Level 4 has a mini-boss with an HP bar.
- No lives → GAME OVER. YOU WIN → name →
scores.json. Top 10 by time.
| Option | Action |
|---|---|
| Start | Start the campaign from level 1 |
| Options | Music / SFX volume (settings.json) |
| Best scores | Top 10 from scores.json |
| Exit | Close the game |
Coins: X / Y— coins on the current levelLevel: N / 4Lives: X(+[SHIELD]when active) andStars: NTime: MM:SS- Top bars: shoot cooldown / i-frames; level 4 — boss HP
Created or appended after a win — one JSON object per line:
{"name":"Jan","time":"1:23","coins":15}The coins field is the total coins collected in the finished campaign. The Top 10 screen loads the file on every open, sorts by time, and shows at most 10 entries.
The game does not crash on missing files — it can run without sound or without a given texture (e.g. enemies fall back to a simple colored rectangle if sprites fail to load).
| Path | Description |
|---|---|
assets/textures/player_sheet.png |
Player spritesheet (9 cols × 3 rows, 80×110 px frames) |
assets/textures/bg_clouds.png |
Parallax layer — clouds |
assets/textures/bg_mountains.png |
Parallax layer — mountains |
assets/textures/bg_trees.png |
Parallax layer — trees |
assets/textures/parallax/l1_*.png … l3_*.png |
Background sets for levels 2–4 (Kenney Background Elements) |
assets/textures/enemies/zombie_walk1.png, zombie_walk2.png |
Enemy walk animation frames (Kenney Platformer Characters) |
Projectiles are drawn as a small rectangle (no dedicated texture).
| Path | Event |
|---|---|
assets/sounds/jump.ogg |
Player jump |
assets/sounds/coin.ogg |
Coin collected |
assets/sounds/death.ogg |
Life lost / respawn |
assets/sounds/gameover.ogg |
Game over |
assets/sounds/shoot.ogg |
Projectile fired (Kenney Interface Sounds — pluck_001) |
| Path | When it plays |
|---|---|
assets/music/menu.ogg |
Main menu (loop) |
assets/music/gameplay.ogg |
Level 1 gameplay (loop) |
assets/music/gameplay_l2.ogg |
Level 2 gameplay (loop) |
assets/music/gameplay_l3.ogg |
Level 3 gameplay (loop) |
assets/music/gameplay_l4.ogg |
Level 4 gameplay (loop) |
assets/music/gameplay_l5.ogg |
Level 5 cave gameplay (loop) |
assets/music/gameplay_l6.ogg |
Level 6 hell gameplay (loop) |
assets/music/gameplay_l7.ogg |
Level 7 pre-finale gameplay (loop) |
assets/music/gameplay_l8.ogg |
Level 8 boss arena (loop; currently same source as L7) |
assets/music/gameover.ogg |
Game over screen |
assets/music/win.ogg |
Win screen |
menu.ogg— Fuzzy, Was He? by Kistol (CC0, OpenGameArt)gameplay.ogg— Feel Good Island Loop (CC0, OpenGameArt; orig. Brandon Morris)gameplay_l2.ogg— Cheesy Loop 1 by Tozan (CC0)gameplay_l3.ogg— Short Plingy Loop by Fupi (CC0)gameplay_l4.ogg— Backfoot by Centurion_of_war (CC0)gameplay_l5.ogg— Mysterious Cave Theme Loop by beardalaxy (CC0)gameplay_l6.ogg— dark_forest_combat from Hell's God part 2 by Centurion_of_war (CC0)gameplay_l7.ogg/gameplay_l8.ogg— Too Strong by Centurion_of_war (CC0)gameover.ogg/win.ogg— Kenney Music Jingles (CC0)
See assets/music/CREDITS.txt.
| Path | Description |
|---|---|
assets/fonts/Roboto-Regular.ttf |
HUD and UI font (Google Fonts, OFL) |
Many assets credited to Kenney are CC0 (public domain). Parallax files under assets/textures/parallax/ come from Kenney Background Elements. See each pack’s License.txt for details.
.
├── CMakeLists.txt
├── README.md
├── assets/
│ ├── fonts/
│ │ └── Roboto-Regular.ttf
│ ├── music/
│ │ ├── menu.ogg
│ │ ├── gameplay.ogg
│ │ ├── gameover.ogg
│ │ └── win.ogg
│ ├── sounds/
│ │ ├── jump.ogg
│ │ ├── coin.ogg
│ │ ├── death.ogg
│ │ ├── gameover.ogg
│ │ └── shoot.ogg
│ └── textures/
│ ├── player_sheet.png
│ ├── bg_clouds.png
│ ├── bg_mountains.png
│ ├── bg_trees.png
│ ├── parallax/
│ │ ├── l1_far.png … l1_near.png
│ │ ├── l2_far.png … l2_near.png
│ │ └── l3_far.png … l3_near.png
│ └── enemies/
│ ├── zombie_walk1.png
│ └── zombie_walk2.png
├── docs/
│ ├── README.md
│ ├── screenshots/ # current gameplay captures (README gallery)
│ ├── architecture.md
│ ├── CHANGELOG.md
│ ├── release_checklist.md
│ ├── specs/ # speki A+B (11–19) + CDEG (20+)
│ └── prompts/ # prompty Cursor (implement / review / batch)
└── src/
├── main.cpp
├── Game.h / Game.cpp
├── Player.h / Player.cpp
├── Platform.h / Platform.cpp
├── Coin.h / Coin.cpp
├── Level.h / Level.cpp
├── Enemy.h / Enemy.cpp
├── Projectile.h / Projectile.cpp
├── Animator.h / Animator.cpp
├── AudioManager.h / AudioManager.cpp
└── ParallaxLayer.h / ParallaxLayer.cpp
Visual polish specs (A+B), next wave (C/D/E/G), and Cursor prompts: docs/README.md. Architecture: docs/architecture.md. Changelog: docs/CHANGELOG.md.
| Class | Responsibility |
|---|---|
Game |
Game loop, states (MENU/PLAYING/GAME_OVER/WINNING/SCORES), HUD, music, parallax, level campaign, projectiles, scores |
Player |
Physics, input, animations, sprite, lives |
Level |
Loading platforms, coins, enemies; player collisions |
Platform |
Platform collision rectangle |
Coin |
Coin — position and collected state |
Enemy |
Enemy — patrol, drawing / animation |
Projectile |
Player projectile — horizontal motion, collisions |
Animator |
Spritesheet — animation frame management |
AudioManager |
Loading and playing short SFX |
ParallaxLayer |
Single background layer with parallax effect |
The repository mixes original code with third-party assets, so the licensing is not uniform:
| Part | License |
|---|---|
Source code (src/, CMakeLists.txt) |
MIT — Copyright (c) 2026 Wojciech Wypych (Iakirmon) |
| Textures, sounds and music from Kenney packs | CC0 1.0 — public domain |
assets/fonts/Roboto-Regular.ttf (Roboto 3.015) |
SIL Open Font License 1.1 — assets/fonts/OFL.txt |
| SFML | zlib/png — external dependency, not part of this repository |
MIT covers the code, not the assets. Roboto stays under OFL 1.1 and its license text is bundled with the repository, because OFL requires it on redistribution.
Gra platformowa 2D w C++17 z biblioteką SFML 2.x. Gracz przechodzi kampanię ośmiu poziomów (krótki tutorial, dłuższe L5–L7, arena bossa L8), zbiera monety i sekretne gwiazdki, skacze (triple jump), strzela pociskami, unika lawy, wrogów i finałowego bossa (12 HP, 4 fazy ataków). Są checkpointy, tarcza (bańka), animacje, SFX, muzyka per poziom oraz parallax. Menu, pauza, opcje głośności, Top 10 i scores.json.
Stan gry (sierpień 2026) — lawa, tarcze, gwiazdki, boss:
| Poziom 1 — las | Poziom 2 — pustynia |
|---|---|
![]() |
![]() |
| Poziom 3 — zamek | Poziom 4 — noc / boss |
|---|---|
![]() |
![]() |
| YOU WIN — wpis nicku |
|---|
![]() |
- C++17
- CMake >= 3.20
- SFML 2.5+ (gałąź 2.x — nie 3.x)
brew install sfmlsudo apt install libsfml-dev
CMakeLists.txtzawiera ścieżki zakodowane na sztywno i oczekuje, że vcpkg znajduje się dokładnie wC:\game2d\vcpkg, a biblioteka SFML wC:\game2d\vcpkg\vcpkg_installed\x64-windows. Poniższe kroki tworzą dokładnie taki układ, więc projekt zbuduje się bez modyfikowaniaCMakeLists.txt.
1. Zainstaluj narzędzia. Pobierz i zainstaluj Visual Studio 2022 z zestawem „Desktop development with C++" (zawiera kompilator MSVC, CMake i Ninja) oraz Git for Windows.
2. Otwórz konsolę dewelopera. Z menu Start uruchom „Developer Command Prompt
for VS 2022" (ma już ustawiony kompilator w PATH).
3. Zainstaluj vcpkg i SFML dokładnie w C:\game2d\vcpkg:
git clone https://github.com/microsoft/vcpkg C:\game2d\vcpkg
cd C:\game2d\vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg install sfml:x64-windows4. Utwórz dowiązanie vcpkg_installed wymagane przez CMakeLists.txt
(klasyczny tryb vcpkg instaluje do installed\, a projekt szuka w
vcpkg_installed\):
mklink /J C:\game2d\vcpkg\vcpkg_installed C:\game2d\vcpkg\installed5. Zbuduj grę (z katalogu projektu):
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=C:\game2d\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake --build build --config ReleaseCMake po zbudowaniu sam kopiuje folder assets/ oraz potrzebne biblioteki DLL
SFML obok pliku .exe.
6. Uruchom grę:
cd build\Release
Platformer.exemkdir build
cd build
cmake ..
cmake --build .Plik wykonywalny: Platformer (Windows: Platformer.exe).
Folder assets/ jest kopiowany automatycznie do katalogu z binarką po każdym buildzie.
cd build
./Platformer # macOS / Linux| Klawisz / akcja | Opis |
|---|---|
↑ / ↓ |
Poruszanie po opcjach |
| Ruch myszy | Podświetlenie opcji pod kursorem |
Enter / LPM |
Wybór opcji |
| Klawisz | Akcja |
|---|---|
A / ← |
Ruch w lewo |
D / → |
Ruch w prawo |
↑ |
Skok (do 3× w powietrzu) |
Spacja |
Strzał (pocisk poziomy, cooldown) |
Escape |
Pauza (Wznów / Opcje / Menu / Wyjdź) |
| Klawisz | Akcja |
|---|---|
R |
Natychmiastowy restart (Game Over) |
Escape |
Powrót do menu (Game Over) |
Enter |
Zatwierdź nick po wygranej → powrót do menu |
- Gra startuje w menu głównym z animowanym tłem parallax.
- Kampania: 8 poziomów — L1 krótki tutorial; L7 kończy się bramą → L8 arena bossa; wygrana po pokonaniu finałowego bossa (monety na L8 opcjonalne).
- Gracz ma 3 życia — wypadnięcie poza mapę, lawa lub kontakt z wrogiem / pociskiem wroga odejmuje życie (tarcza pochłania jeden cios od wroga/pocisku, nie chroni przed lawą i upadkiem).
- Checkpointy — po śmierci wracasz na ostatni zapisany punkt (monety / gwiazdki / zabici wrogowie zostają).
- Tarcza (bańka) — pickupy na mapie; aktywna tarcza widać wokół gracza i jako
[SHIELD]w HUD. - Gwiazdki — opcjonalne sekrety; licznik w HUD.
- Wrogowie patrolują; strzelają tylko gdy patrzą w stronę gracza. L8: finałowy boss (ectoplasm, 12 HP, spread / dash / pierścień pocisków, miniony nietoperzy); platformy w powietrzu na arenie.
- Brak żyć → GAME OVER. YOU WIN → nick →
scores.json. Top 10 sortuje po czasie.
| Opcja | Akcja |
|---|---|
| Start | Rozpoczyna kampanię od poziomu 1 |
| Opcje | Głośność muzyki / SFX (settings.json) |
| Najlepsze wyniki | Ekran Top 10 z scores.json |
| Wyjdź | Zamknięcie gry |
Coins: X / Y— monety na aktualnym poziomieLevel: N / 4Lives: X(+[SHIELD]gdy tarcza aktywna) orazStars: NTime: MM:SS- Paski u góry: cooldown strzału / i-frame; na poziomie 4 — HP bossa
Plik tworzony / dopisywany po wygranej — jeden wpis na linię:
{"name":"Jan","time":"1:23","coins":15}Pole coins to łączna liczba monet zebranych w ukończonej kampanii. Ekran Top 10 wczytuje plik przy każdym otwarciu, sortuje po czasie i wyświetla maksymalnie 10 wyników.
Gra nie crashuje przy braku plików — działa bez dźwięku lub bez tekstury (np. wrogowie mają wtedy prosty kolorowy prostokąt zamiast sprite’u).
| Ścieżka | Opis |
|---|---|
assets/textures/player_sheet.png |
Spritesheet gracza (9 kolumn × 3 wiersze, klatki 80×110 px) |
assets/textures/bg_clouds.png |
Warstwa parallax — chmury |
assets/textures/bg_mountains.png |
Warstwa parallax — góry |
assets/textures/bg_trees.png |
Warstwa parallax — drzewa |
assets/textures/parallax/l1_*.png … l3_*.png |
Zestawy tła pod poziomy 2–4 (Kenney Background Elements, m.in. pustynia / zamek / noc) |
assets/textures/enemies/zombie_walk1.png, zombie_walk2.png |
Klatki animacji chodu wroga (Kenney Platformer Characters) |
Pociski są rysowane jako mały prostokąt (bez osobnej tekstury).
| Ścieżka | Zdarzenie |
|---|---|
assets/sounds/jump.ogg |
Skok gracza |
assets/sounds/coin.ogg |
Zebranie monety |
assets/sounds/death.ogg |
Utrata życia / respawn |
assets/sounds/gameover.ogg |
Game over |
assets/sounds/shoot.ogg |
Wystrzelenie pocisku (Kenney Interface Sounds — pluck_001) |
| Ścieżka | Kiedy gra |
|---|---|
assets/music/menu.ogg |
Menu główne (pętla) |
assets/music/gameplay.ogg |
Poziom 1 (pętla) |
assets/music/gameplay_l2.ogg |
Poziom 2 (pętla) |
assets/music/gameplay_l3.ogg |
Poziom 3 (pętla) |
assets/music/gameplay_l4.ogg |
Poziom 4 (pętla) |
assets/music/gameplay_l5.ogg |
Poziom 5 — jaskinia (pętla) |
assets/music/gameplay_l6.ogg |
Poziom 6 — piekło (pętla) |
assets/music/gameplay_l7.ogg |
Poziom 7 — przed finałem (pętla) |
assets/music/gameplay_l8.ogg |
Poziom 8 — arena bossa (obecnie ten sam utwór co L7) |
assets/music/gameover.ogg |
Ekran game over |
assets/music/win.ogg |
Ekran wygranej |
Pliki muzyczne:
menu.ogg— Fuzzy, Was He? by Kistol (CC0, OpenGameArt)gameplay.ogg— Feel Good Island Loop (CC0, OpenGameArt; oryg. Brandon Morris)gameplay_l2.ogg— Cheesy Loop 1 by Tozan (CC0)gameplay_l3.ogg— Short Plingy Loop by Fupi (CC0)gameplay_l4.ogg— Backfoot by Centurion_of_war (CC0)gameplay_l5.ogg— Mysterious Cave Theme Loop by beardalaxy (CC0)gameplay_l6.ogg— dark_forest_combat z Hell's God part 2 by Centurion_of_war (CC0)gameplay_l7.ogg/gameplay_l8.ogg— Too Strong by Centurion_of_war (CC0)gameover.ogg/win.ogg— Kenney Music Jingles (CC0)
Szczegóły: assets/music/CREDITS.txt.
| Ścieżka | Opis |
|---|---|
assets/fonts/Roboto-Regular.ttf |
Czcionka HUD i UI (Google Fonts, OFL) |
Wiele plików graficznych i dźwiękowych oznaczonych jako pochodzące z Kenney jest na licencji CC0 (domena publiczna). Tekstury parallax w assets/textures/parallax/ pochodzą z paczki Kenney Background Elements (Flat / PNG). Szczegóły w License.txt w paczce źródłowej.
.
├── CMakeLists.txt
├── README.md
├── assets/
│ ├── fonts/
│ │ └── Roboto-Regular.ttf
│ ├── music/
│ │ ├── menu.ogg
│ │ ├── gameplay.ogg
│ │ ├── gameover.ogg
│ │ └── win.ogg
│ ├── sounds/
│ │ ├── jump.ogg
│ │ ├── coin.ogg
│ │ ├── death.ogg
│ │ ├── gameover.ogg
│ │ └── shoot.ogg
│ └── textures/
│ ├── player_sheet.png
│ ├── bg_clouds.png
│ ├── bg_mountains.png
│ ├── bg_trees.png
│ ├── parallax/
│ │ ├── l1_far.png … l1_near.png
│ │ ├── l2_far.png … l2_near.png
│ │ └── l3_far.png … l3_near.png
│ └── enemies/
│ ├── zombie_walk1.png
│ └── zombie_walk2.png
├── docs/
│ ├── README.md
│ ├── screenshots/ # current gameplay captures (README gallery)
│ ├── architecture.md
│ ├── CHANGELOG.md
│ ├── release_checklist.md
│ ├── specs/ # speki A+B (11–19) + CDEG (20+)
│ └── prompts/ # prompty Cursor (implement / review / batch)
└── src/
├── main.cpp
├── Game.h / Game.cpp
├── Player.h / Player.cpp
├── Platform.h / Platform.cpp
├── Coin.h / Coin.cpp
├── Level.h / Level.cpp
├── Enemy.h / Enemy.cpp
├── Projectile.h / Projectile.cpp
├── Animator.h / Animator.cpp
├── AudioManager.h / AudioManager.cpp
└── ParallaxLayer.h / ParallaxLayer.cpp
Speki polishu wizualnego (A+B) i kolejna fala (C/D/E/G) oraz prompty Cursor: docs/README.md. Architektura: docs/architecture.md. Changelog: docs/CHANGELOG.md.
| Klasa | Odpowiedzialność |
|---|---|
Game |
Pętla gry, stany (MENU/PLAYING/GAME_OVER/WINNING/SCORES), HUD, muzyka, parallax, kampania poziomów, pociski, wyniki |
Player |
Fizyka, input, animacje, sprite, życia |
Level |
Ładowanie platform, monet i wrogów, kolizje gracza |
Platform |
Prostokąt kolizyjny platformy |
Coin |
Moneta — pozycja, stan zebrania |
Enemy |
Wróg — patrol, rysunek / animacja |
Projectile |
Pocisk gracza — ruch poziomy, kolizje |
Animator |
Spritesheet — zarządzanie klatkami animacji |
AudioManager |
Ładowanie i odtwarzanie krótkich SFX |
ParallaxLayer |
Jedna warstwa tła z efektem paralaksy |
Repozytorium łączy kod własny z zasobami z zewnątrz, więc licencja nie jest jednolita:
| Część | Licencja |
|---|---|
Kod źródłowy (src/, CMakeLists.txt) |
MIT — Copyright (c) 2026 Wojciech Wypych (Iakirmon) |
| Tekstury, dźwięki i muzyka z paczek Kenney | CC0 1.0 — domena publiczna |
assets/fonts/Roboto-Regular.ttf (Roboto 3.015) |
SIL Open Font License 1.1 — assets/fonts/OFL.txt |
| SFML | zlib/png — zależność zewnętrzna, nie jest częścią repozytorium |
MIT obejmuje kod, nie zasoby. Czcionka Roboto pozostaje na OFL 1.1, a jej tekst licencji jest dołączony do repozytorium, bo OFL wymaga tego przy redystrybucji.




