Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Easier way to use pygame

Project Description
# EzPyGame

## Introduction

`EzPyGame` aims to make the usage of [`pygame`](
easier and more pythonic than before. It implements easy scene management tools and an application class for initializing `pygame` and running scenes easily.

## Installation

pip install ezpygame

## Usage

Create your scenes by subclassing `ezpygame.Scene` class and overriding the following methods (everything is optional, so override only the ones you actually need):

- `draw(self, app, screen)`
- `update(self, app, dt)`
- `handle_event(self, app, event)`
- `on_enter(self, app, previous_scene)`
- `on_exit(self, app, next_scene)`

Now create an `ezpygame.Application` instance and start the program's execution from any scene instance you want:

app = ezpygame.Application(update_rate=60) # 60 fps!
main_menu = MenuScene()

Scenes can be switched by using the `Scene.change_scene(scene)` method.

## Example usage

import ezpygame
import pygame

class Menu(ezpygame.Scene):

def draw(self, app, screen):

def handle_event(self, app, event):
if event.type == pygame.MOUSEDOWN and ...:

def on_enter(self, app, previous_scene):
app.update_settings(size=(640, 480))

class Game(ezpygame.Scene):

def __init__(self, bar, ...):
super().__init__() = bar

def draw(self, app, screen):

def update(self, app, dt):

def handle_event(self, app, event):
if self.player.died():

def on_enter(self, app, previous_scene):
self.previous_scene = previous_scene
app.update_settings(size=(1280, 720))

app = ezpygame.Application('My Application', (640, 480), update_rate=30)
menu = Menu()
Release History

Release History

This version
History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
EzPyGame-0.1.tar.gz (2.9 kB) Copy SHA256 Checksum SHA256 Source Mar 30, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting