Defender's Domain is a command-line interface (CLI) game where players defend their domain from incoming enemies displayed as ASCII characters. The game is developed in C++ and leverages the Windows API for audio playback. Players strategically place various types of towers on a grid to destroy enemies before they reach the door. Each tower has unique properties and can be upgraded over time to enhance gameplay. The game features simple ASCII-based graphics and offers a challenging and engaging experience.
The project contains the following files and directories:
audio/- This directory contains audio files used in the game.constants.h- Header file that defines all constants used throughout the project.draw.cpp- Source file that contains the logic for rendering the game graphics.draw.h- Header file that declares the functions indraw.cpp.game.cpp- Source file that contains the main game logic.game.h- Header file that declares the functions ingame.cpp.main.cpp- The entry point of the application where execution begins.PTD.exe- The compiled executable for Windows.screenshots/- This directory contains screenshots of the game.LICENSE- The license file for the project.
- The game features simple ASCII-based graphics.
- Players can place mines on the battlefield to destroy enemies.
- Choose from different types of mines to enhance gameplay.
- Various types of mines with unique properties for increased strategic and versatile gameplay.
Welcome to the Defender's Domain! Your goal is to strategically place different types of bombs to defeat enemies and reach the door.
| Key | Action Description |
|---|---|
| Arrow Keys | Move your cursor around the grid to select where to place bombs or interact with objects. |
| Enter | Confirm selection or place a bomb on the currently selected grid cell. |
| Number keys (1-7) | Switch between different types of bombs to select which one you want to place. Each bomb type has unique abilities and effects. |
| Spacebar | Activate or toggle the bomb placement mode. When active, you can place bombs on the grid. |
- Grid Cells: The game board where you move and place bombs.
- Bomb Types: Different elemental bombs such as Electro, Fire, Poison, Water, Ice, Wind, and Shadow.
- Enemies: Various colored characters on the grid that you need to defeat with your bombs.
- Timer & Score: Track your time and points earned by defeating enemies.
- Use number keys to cycle through bombs with different levels and effects.
- Move your cursor using arrow keys and press Enter to plant the selected bomb.
- Toggle bomb placement mode using the Spacebar.
- Watch bomb stats (level, explosion time, blast range) displayed next to the grid.
- Defeat enemies by strategically placing bombs.
- Red Highlight: Shows the active cell ready for bomb placement.
- Colored Letters: Represent different enemy types on the grid.
- Bomb Symbols: Indicate bombs placed on grid cells, showing type and level.
Good luck and have fun!
Some screenshots of the game are shown below:
To compile the program, you need to have a C++ compiler installed on your system. Below are the commands for compiling the project on different operating systems and compilers:
- C++ Compiler
- Windows API
Open your command prompt and run the following command:
g++ main.cpp game.cpp draw.cpp -o DD.exe -lwinmm
cl main.cpp Game.cpp draw.cpp /FeDD.exe /link winmm.lib
If you liked this project you are free to fork it for your own use as well!.
Project Co-Developed by @JayanshDevgan(Jayansh Devgan) and @U-K-06(Utkarsh Khajuria)
