Flappy-man is a fun and challenging game inspired by the classic Flappy Bird, but with a twist: it’s entirely built in PHP and designed to run in a Linux command-line terminal using ASCII characters.
- Character Animation: The main character, "Flappy-man", is animated with just ASCII characters, providing a unique visual experience.
- Responsive Controls: Control Flappy-man with the keyboard and help him fly through the air while avoiding obstacles.
- Gravity Simulation: Flappy-man gradually falls due to gravity, so press SPACE to keep him in the air.
- Randomized Obstacles: Each game generates a new set of buildings with randomly placed gaps, ensuring a fresh experience every time.
- Collision Detection: Impacting buildings or the ground ends the game, with a fun twist where the character display reacts to collisions.
- ReactPHP-powered Animation: Smooth scrolling of the obstacles and animation of Flappy-man is handled via ReactPHP for a seamless gameplay experience.
Check out some GIFs of Flappy-man in action:
Feature | GIF Preview |
---|---|
Character Animation | |
World Selection | |
Collision Detection |
Worlds | GIF Preview |
---|---|
Earth | |
Krypton |
- Use the SPACE key to make Flappy-man fly.
- Press Q to quit the game at any time.
- Avoid obstacles and try to get the highest score!
- PHP 8.0+
- Linux or macOS (Windows is not fully supported due to terminal limitations)
- Terminal with UTF-8 support
-
Clone the repository:
git clone https://github.com/yourusername/flappy-man.git cd flappy-man
-
Install the dependencies:
composer install
-
Start the game:
php artisan game:start
Note: The game runs best on Linux-based systems. Windows support is limited due to how input handling is managed in terminals.
To clear the cache, run the following command:
sh scripts/refresh_cache.sh
This project is licensed under the MIT License. See the LICENSE file for details.