Skip to main content

Flappy Bird Game Engine

The purpose of this project is to provide a simple game engine for running Flappy Bird. The engine is powered by Pygame and can be used simply by importing the GameEngine class into a project and utilizing the provided methods.

Gameplay

The space bar is used to jump and the score is tracked as the number of elapsed seconds since the game began. Hitting the pipes, ground, or ceiling results in instant death.

Constants

game_engine.WINDOW_SIZE
A tuple declaring the width and height of the game window.

Classes

game_engine.GameEngine
This class maintains the state of the game and provides several methods for updating its state. It is the only class needed to start, run, and maintain the game.

Functions

game_engine.GameEngine(window, fps)
Creates a GameEngine object for running a game of Flappy Bird.
window (pygame.Surface): A window inside which the game is drawn.
fps (int): The number of game frames to be rendered per second, recommended value is 30.

game_engine.GameEngine.start_game()
Starts a new game with a brief 3 second countdown allowing for the player to ready themselves.

game_engine.GameEngine.events()
Handles player diven events, to be called once each frame.

game_engine.GameEngine.update_state()
Updates the state of the game, to be called once each frame.

game_engine.GameEngine.draw_frame()
Draws the current frame to the screen, called once each frame.

game_engine.GameEngine.next_frame()
Waits an appropriate length of time to ensure the desired FPS is maintained, called once at the end of each frame.

Release files for flappy-bird-engine 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flappy-bird-engine 0.0.4
File Size Uploaded
flappy_bird_engine-0.0.4.tar.gz 14.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flappy-bird-engine 0.0.4
File Interpreter ABI Platform
flappy_bird_engine-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 31.7 kB

Release files / flappy_bird_engine-0.0.4.tar.gz

Download URL flappy_bird_engine-0.0.4.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bae92329201781d571e281b76c42fbf5e8dfd59dee280b45fe3c19e8b812bf21
BLAKE2b-256 checksum
How to use checksums
66fec9588ba96e8fee9df031c516d65d68089fbf5d82ac535c80af544e97a2e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.3

Release files / flappy_bird_engine-0.0.4-py3-none-any.whl

Download URL flappy_bird_engine-0.0.4-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21111abc234cf2adff7afffc917dccc162c3ff1c3fe9e28847e16748dc2068c6
BLAKE2b-256 checksum
How to use checksums
568658f26b567042ced589c011da8b4e46488cb7ae3e3933bebff00bb567d5e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page