Engine

class pypunk.core.Engine(width, height[, frame_rate=60[, title="PyPunk"]])

Main game class. Manages game loop.

Parameters:
  • width – The width of your game.
  • height – The height of your game.
  • frame_rate – The game framerate, in frames per second.
  • title – The window caption for your game.
paused = True

If the game should stop updating/rendering.

start()

Starts the PyPunk loop. Should be called after setting PP.world so as to start running the game.

close([event = None])

Signals the Engine to stop it’s loop, and exit the game.

Project Versions

Previous topic

Core

Next topic

World

This Page