Skip to main content

A simple game engine for making Flappy Bird

Project description

Flappy Engine

About

Flappy Engine is a game engine for making Flappy Bird with editable features such as the bird color or the pipe size

Installation

To set it up first install the engine using pip install flappy_engine once Flappy Engine is installed then its ready to be used!

Usage

To use, first import the engine with import flappy_engine then, create the engine using engine = flappy_engine.Engine() once that is done then it's time to customize it!

Customizing

Here is a list of all of the functions for customizing:

flappy_engine.Engine().SetWindowSize(int: width, int: height)

flappy_engine.Engine().SetWindowTitle(str: title)

flappy_engine.Engine().SetJumpKey(flappy_engine.Key: key)

flappy_engine.Engine().SetWindowFPS(int: fps)

flappy_engine.Engine().SetWindowBackgroundColor(int: r, int: g, int: b)

flappy_engine.Engine().SetBirdGravity(int: gravity)

flappy_engine.Engine().SetBirdJumpForce(int: force)

flappy_engine.Engine().SetBirdJumpCooldown(float: cooldown)

flappy_engine.Engine().SetBirdColor(int: r, int: g, int: b)

flappy_engine.Engine().SetBirdSize(int: width, int: height)

flappy_engine.Engine().SetWindowSize(int: width, int: height)

flappy_engine.Engine().SetPipeSpeed(int: speed)

flappy_engine.Engine().SetPipeGap(int: gap)

flappy_engine.Engine().SetPipeFrequency(float: frequency)

flappy_engine.Engine().SetPipeColor(int: r, int: g, int: b)

flappy_engine.Engine().SetPipeWidth(int: width)

flappy_engine.Engine().SetScoreColor(int: r, int: g, int: b)

Running The Game

To run the game use Engine.Run().run().

Editing Stats In-Game

To edit stats in-game instead of using Engine.Run().run() use process = Engine.Run() then create a function and put the decorator process.Frame. To run the game, put process.run() after the funcion. Now the function will run every frame in the game!

Example

Here is an exampple of how to use this engine:

import flappy_engine

r = 0
g = 0
b = 0

engine = flappy_engine.Engine()

engine.SetBirdColor(r, g, b)
engine.SetWindowBackgroundColor(r, g, b)

process = engine.Run()

@process.Frame
def frame():
    global r, g, b
    if r < 255:
        r += 1
    elif b < 255:
        b += 1
    elif g < 255:
        g += 1
    else:
        r = 0
        b = 0
        g = 0
    engine.SetPipeWidth(engine.score * 10 + 10)
    engine.SetScoreColor(r, g, b)
    engine.SetPipeColor(r, g, b)
    engine.SetBirdColor(r, g, b)

process.run()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flappy_engine-1.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flappy_engine-1.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file flappy_engine-1.1.0.tar.gz.

File metadata

  • Download URL: flappy_engine-1.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for flappy_engine-1.1.0.tar.gz
Algorithm Hash digest
SHA256 524a7a4c4dc72001394f87a708b4b458996bdff829379279c98e15f442dc690a
MD5 2f27d6d95f55210a316dc091fb86b82c
BLAKE2b-256 76260acb936048c7dfd4b9ccc0656f1c8e43891da8d16e42b8b6ee2d29b3bc38

See more details on using hashes here.

File details

Details for the file flappy_engine-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: flappy_engine-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for flappy_engine-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2dfc0e5a4aa844f70f3c67b077e9f7b7560040710bea821dc5b500bec429aec5
MD5 966e54ec9b7d35be8f97660fa86c0c7e
BLAKE2b-256 73dd8a5c6fcf4af5e074f12350833c17befff8b2b4818ba123611521a84ed5e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page