Skip to content

JayanshDevgan/Defenders_Domain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

128 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Defender's Domain

Overview

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.

Project Structure

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 in draw.cpp.
  • game.cpp - Source file that contains the main game logic.
  • game.h - Header file that declares the functions in game.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.

Features

  • 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.

How to Play

Welcome to the Defender's Domain! Your goal is to strategically place different types of bombs to defeat enemies and reach the door.


Controls & Key Bindings

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.

Game Elements

  • 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.

Gameplay Tips

  • 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.

Visual Cues in the Game

  • 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!

Screenshots

Some screenshots of the game are shown below:

Screenshot 1:

Initial Grid

Screenshot 2:

Gameplay

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:

Requirements

  • C++ Compiler
  • Windows API

Compiling the Program

Windows

Open your command prompt and run the following command:

GCC

g++ main.cpp game.cpp draw.cpp -o DD.exe -lwinmm

MSVC

cl main.cpp Game.cpp draw.cpp /FeDD.exe /link winmm.lib

End

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)

About

Game written in C++ (CLI)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages