Need help with pursuedpybear?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

203 Stars 90 Forks Artistic License 2.0 1.4K Commits 118 Opened issues


A python game engine.

Services available


Need anything else?

Contributors list


stable: Documentation Status

canon: Documentation Status

PursuedPyBear, also known as

, exists to be an educational resource. Most obviously used to teach computer science, it can be a useful tool for any topic that a simulation can be helpful.

A Game Engine

At its core,

provides a number of features that make it perfect for video games. The
itself provides a pluggable subsystem architecture where adding new features is as simple as subclassing and extending
. Additionally, it contains a state stack of
simple containers that let you organize game scenes and UI screens in a simple way.

The entire system uses an event system which is as extensible as the rest of the system. Register new values to existing event types, and even overwrite the defaults. Adding a new event type to the system is as simple as firing an instance of your new event class with

. Instead of a publisher system, the engine knows everything in its own scope and only calls objects with appropriate callbacks. The most basic event is
and your handlers should match the signature
on_update(self, update_event, signal)

Guiding Principles


started to be a game framework great for learning with, the project has a few longterm goals:

Education Friendly

Non-technical educators should feel comfortable after very little training. While some programming knowledge is required, the ability to think in objects and responses to events allows educators to only focus on their lessons.

Idiomatic Python

A project built on

should look like idiomatic Python. It also should look like modern Python. As such, we often add new language features as soon as they're available, letting a new user always know ppb runs on the latest Python.

Object Oriented and Event Driven

games are built out of instances of objects. Each object only has enough information to respond to the event provided, which always includes the current
. Because
doesn't have a master list of events, you can provide new ones simply to add more granular control over your game.

Hardware Library Agnostic


strongly tries to be extensible and pluggable, each hardware extension can provide its own hooks to
, and you can nearly seamlessly switch between various Python libraries.


One of the maintainers put it best:

If it’s not fun to use, we should redo it

ppb is about filing off the rough edges so that the joy of creation and discovery are both emphasized. A new user should be able to build their first game in a few hours, and continue exploring beyond that.

Try it

Install ppb in the standard method:

pip install ppb

provides a
function that makes it simple to start single screen games.

To make a very simple game, make a directory and add an image file called

to it. Then add the following to a python file and run it.
import ppb
from ppb.features.default_sprites import TargetSprite

class Ship(TargetSprite): target = ppb.Vector(0, 40)

def setup(scene): scene.add(Ship(position=(0, -7)))

Depending on your operating system, you may need to install additional packages (see installation guide).


is guaranteed compatible with Python 3.6 or later.

Get Involved

The fastest way to get involved is to check out the ongoing discussions. If you're already using

feel free to report bugs, suggest enhancements, or ask for new features.

If you want to contribute code, definitely read the relevant portions of Contributing.MD

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.