Fireball is a simple terminal-based game implemented in C++ using the ncurses
library. The player controls a widget that can move left and right to shoot bullets at incoming boxes. The goal is to hit all the boxes and avoid letting any box touch the widget.
- Movable Widget: Move the widget left and right using arrow keys.
- Shooting Mechanism: Shoot bullets using the spacebar.
- Infinite Boxes: Boxes fall from the top of the screen and must be hit by bullets.
- Score Tracking: The score is incremented with each box hit.
- Game Over: The game ends if a box touches the widget.
- C++ compiler (e.g.,
g++
) ncurses
library
git clone https://github.com/psidh/Games-CPP
cd fireball
If you are using macOS, you can install ncurses
using Homebrew:
brew install ncurses
Use the following command to compile the code:
g++ -std=c++11 main.cpp -o main -lncurses
Execute the compiled program:
./main
- Arrow Keys: Move the widget left and right.
- Spacebar: Shoot bullets.
Contributions are welcome! Please open an issue or submit a pull request if you have improvements or bug fixes.
This project is licensed under the MIT License - see the LICENSE file for details.
- This game uses the
ncurses
library for terminal handling. - Thanks to the open-source community for their valuable tools and libraries.