https://github.com/grzelkaw/dungeonexplorer
C++ SFML game
https://github.com/grzelkaw/dungeonexplorer
cpp game rougelike rpg sfml
Last synced: about 2 months ago
JSON representation
C++ SFML game
- Host: GitHub
- URL: https://github.com/grzelkaw/dungeonexplorer
- Owner: grzelkaw
- Created: 2025-02-18T13:35:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-19T12:23:20.000Z (over 1 year ago)
- Last Synced: 2025-03-02T21:38:08.127Z (over 1 year ago)
- Topics: cpp, game, rougelike, rpg, sfml
- Language: C++
- Homepage:
- Size: 81.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DungeonExplorer
Rouge Like game made in C++ using SFML library. It was an final assignment on first year of studies.
# How to start
Download the 'game' folder, inside you have .exe file. Open the .exe file and game is ready to go. In the 'files' folder there are all .cpp and .h source files if you want to check yourself
# Starting screen
On start we can choose our gamemode, single or multiplayer coop. In multiplayer second player uses keys JIKL to move and Numpad to shot. Also have other color than main player to avoid mistake in steering.

# Gameplay
The game revolves around exploring rooms, defeating all enemies, and advancing to the next floor. After each enemy encounter, you gain experience, which allows your hero to level up, increasing stats such as damage, speed, and attack frequency.
Throughout the map, you can find and open chests that may contain gold or stat upgrades. Gold can be spent in special gold rooms to purchase items that provide various effects, such as double-shot, piercing attacks, or healing abilities. The primary objective is to defeat the boss, who typically appears in the final room of each floor, gather his special item, and then repeat the cycle.
You can also watch gameplay on video here: https://youtu.be/fwEFi-zKaQQ?si=WnwLEPS5Od3dbDAR

# Code
Game was programmed in C++ 17 with SFML in version 2.6.2 from 04.2024 to 06.2024. We have here division into classes. Main file combine every other file and run main loop where game is running.
# Classes
Below description on most of the used classes in project.
Player
Player class handle things like steering from keyboard, his statistics, list of picked up items or collision detection.
Animation
Handling animation by slicing the sprite in parts, and then going through every frame to represent animation.
World
GameTile class is about one 100x100 pixel tile on the world. It provides data like texture, special effects like spikes which deal damage or slime which slow downs player.
GameWorld class however merges all this single tiles, and put them into the matrix to assemble whole room. In this matricies we input different number where every other number symbols different tile. This class also use DFS algorithm to generate randomly create dungeons using room quota.

Enemy
Enemy is abstract class who is parent to other various classes like enemyZombie, enemyGhost etc. Enemy have parameters like sprite, stats, collision and child classes have their own movement or attack type.

Object
Object class is also abstract simmilar to enemy, but this time is about objects that spawn in the rooms. Classes like objectMedKit or objectChest inherit from object chaning only their action on contact with player.

Item
Abstract class same as object or enemy. Is used to give player different effect after picking item like multi-shot or healing.

# Pause
We can also pause the game, where we can turn off music, or save and load game. Save and Load works by saving our stats and items to txt file, and loading it up when we want.

# Summary
That's all for now, I ended this project because of lack of free time. Feel free to download, test the game yourself and leave feedback!
Made by Wiktor Grzelka