Skip to content

Latest commit

ย 

History

History
77 lines (56 loc) ยท 2.29 KB

File metadata and controls

77 lines (56 loc) ยท 2.29 KB

Balloon Flight ๐ŸŽˆ

A simple, endless side-scrolling arcade game built with Python and Pygame Zero. Navigate your hot air balloon through a world of obstacles, avoid the birds and buildings, and compete for the high score!

๐ŸŽฎ Game Features

  • Endless Gameplay: The game continues as long as you survive.
  • Gravity Physics: Click to fly up, release to fall.
  • Randomized Obstacles: Dodge birds flying at different heights, and avoid houses and trees on the ground.
  • High Score System: Scores are automatically saved to a local file.
  • Restart Function: Quickly restart after a crash without closing the window.

๐Ÿ› ๏ธ Prerequisites

To run this game, you need:

  1. Python 3.x installed on your system.
  2. Pygame Zero library.

๐Ÿ“ฆ Installation

  1. Clone the repository (or download the files):

    git clone https://github.com/yourusername/balloon-flight.git
    cd balloon-flight
  2. Install dependencies:

    pip install pgzero

    or using the requirements file:

    pip install -r requirements.txt
  3. Asset Setup: Pygame Zero requires images to be placed in an images/ directory. Ensure your project structure looks like this:

    balloon-flight/
    โ”œโ”€โ”€ game.py
    โ”œโ”€โ”€ high-scores.txt
    โ”œโ”€โ”€ README.md
    โ”œโ”€โ”€ requirements.txt
    โ””โ”€โ”€ images/
        โ”œโ”€โ”€ background.png
        โ”œโ”€โ”€ balloon.png
        โ”œโ”€โ”€ bird-up.png
        โ”œโ”€โ”€ bird-down.png
        โ”œโ”€โ”€ house.png
        โ””โ”€โ”€ tree.png
    

    Note: You will need to provide your own image assets (PNG format) with the names listed above inside the images/ folder.

๐Ÿš€ How to Run

Execute the game using the pgzrun command:

pgzrun game.py

๐Ÿ•น๏ธ Controls

  • Left Mouse Click (Hold): Fly Up โฌ†๏ธ
  • Release Mouse: Fall Down (Gravity) โฌ‡๏ธ
  • Objective: Survive as long as possible and avoid hitting obstacles or the edges of the screen.

๐Ÿ† High Scores

The game tracks your top scores locally in the high-scores.txt file. When you crash, the top scores are displayed on the screen.

๐Ÿ“ License

This project is open source. Feel free to modify and improve it!