Skip to content

A simple flappy bird clone written in PHP with Laravel and ReactPHP for the terminal.

License

Notifications You must be signed in to change notification settings

noweh/flappy-man

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flappy-man

PHP Laravel ReactPHP MIT Licensed

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.

Cover Image

Table of Contents

Features

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

Demo

Check out some GIFs of Flappy-man in action:

Feature GIF Preview
Character Animation Character Animation
World Selection World Selection
Collision Detection Collision Detection

Worlds

Worlds GIF Preview
Earth Obstacles and Gameplay
Krypton Obstacles and Gameplay

Controls

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

Requirements

  • PHP 8.0+
  • Linux or macOS (Windows is not fully supported due to terminal limitations)
  • Terminal with UTF-8 support

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/flappy-man.git
    cd flappy-man
  2. Install the dependencies:

    composer install
  3. 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.

Cache

To clear the cache, run the following command:

sh scripts/refresh_cache.sh

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A simple flappy bird clone written in PHP with Laravel and ReactPHP for the terminal.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages