Welcome to Dark Cave, a simple C++ command-line game where you play as a player represented by the character 'P' and must find the treasure 'T' on an 8x8 map while avoiding enemies 'E'. The hidden part of the map is represented by the character 'X'.
To build the game, you will need the following tools installed on your system:
- Windows 10 or later
- CMake version 3.22.1 or later
- Make version 4.3 or later
To build the game, follow these steps:
-
Clone the repository to your local machine.
-
Navigate to the root directory of the repository.
-
Run the build command:
build.bat
-
The built executable file will be located in the "build/Debug" directory. You can run the game by executing this file in the terminal:
cd Debug DarkCave.exe
That's it! You should now be able to build and run the Dark Cave game on your system.
- To start the game, compile and run the DarkCave file.
- You will be placed in the botton center of the map. The treasure will be randomly placed on the map.
- Use the numbers to move around the map and try to find the treasure.
- Be careful, if you encounter an enemy, you will die and the game will be over.
- If you find the treasure, you win the game!
This game was developed in C++ and utilizes basic control flow and logic. The game logic is stored in the main.cpp file, which contains the main game loop. The positions of the treasure and enemies are randomly generated in the beginning of the game using a two-dimensional array.
The project must follow this basic structure:
DarkCave/
│
├── build/ # Build files
│
├── include/ # Public header files
│
├── src/ # Source files
│
└── README.md # Project README
│
└── CMakeLists.txt # Project CMake
│
└── main.cpp # Main code