C++ · SFML · Top-Down Dungeon Crawler
ZOMBIE
A top-down dungeon crawler built from scratch in C++ with SFML.
Survive the dungeon and find the missing girl. Don't die.
SCROLL ↓
About Me
About the Project
ZOMBIE is a top-down survival shooter game where the player can walk around the procedurally generated dungeon while fighting zombies, collecting ammo and health potions, avoiding traps and managing resources and ultimately hunting down the boss to rescue Lily, a missing girl the player must find.
Core Features
Procedurally Generated Map
The dungeon is different each playthrough. The placement of every room, the path connecting them and the route to the boss room. No single path is guaranteed and the mini map starts completely dark and only reveals the rooms to the player only when they discover it. This means that player can't memorise the dungeon layout and find the boss right away. Every run is a process of exploration and of player discovering the world in real time while managing health, ammo and the enemies around them, a path to the boss room always exists but the player never knows the dangerous rooms that stand in between the player and the boss.
State Machine AI
Intelligent enemy behaviour has Patrol, chase, attack and search states. The enemy AI uses state machines that gives the zombies good behaviour patterns. Zombies begin in patrol state wandering randomly through the rooms until the player enters their detection radius. When one zombie is alerted he will alert other zombies and let them know the players location within the 250-pixel alert radius, triggering a coordinated swarm behaviour. When the player leaves the zombies line of sight the zombies won't immediately give up. They will go to the players last known location and search there for 10 seconds before returning to patrol state. The pathfinding system uses A* algorithm to navigate the tile-based environment, recalculating paths every 0.3 seconds to adapt to player movement.
Combat System
The combat system is mouse aimed shooting where the player can fire bullets where they aim and shoot by pressing left click. Each shot will waste the player ammo which forces the player to carefully manage their resources throughout their adventure in the dungeon. The shooting mechanism operates on a 0.3 second cooldown preventing the player from spamming while shooting. The hitbox-based collision ensures precise combat interactions with enemies. Enemy health bars float above their heads providing visual feedback.
Key Collection
One randomly selected zombie per room will have a key and when that zombie dies a key will drop. The player can pick up the key by walking over it and it will show up in their inventory. This adds difficulty to the game since the player must kill zombies to find a key and get to the next room. The player must stand close to the locked door and hold “E” to open it. Releasing E and moving away from the locked door cancels the unlock. When the player unlocks it the door tile clears in both the current room and the adjacent room simultaneously so neither side blocks passage after the unlock is complete.
Boss Zombie
The boss zombie is the biggest threat in the dungeon and is what the player must defeat to win the game. The boss zombie is way larger and has more attacks than regular zombies. The boss has the ability to charge at the player, when the boss is close to the player it performs a heavy attack. The hardest moment in the fight happens when the boss drops to half health. The boss stops and summons minions around itself forcing the player to focus on killing both the boss and the minions, and continues to spawn them throughout the fight.
Difficulty System & Dynamic Lighting
Three game modes the player can choose from (easy, medium, hard) that scale player stats, enemy counts, enemy stats, trap counts, pickup values, fire rates and lighting. The dungeon is not fully visible. The player can only see a circle of warm orange light around themselves, the room is dark and it's harder to see enemies approaching. Torches add small flickering light to the room. On Hard difficulty the light takes on a deep blood-red tint and the player's own light pool shrinks further making each room feel more dangerous than on lower settings.
Screenshots
Click any image to expand.