PyGameEngine Release 1 Now Available!

The source for PyGameEngine release 1 is now available at There is also a discussion topic there. The highlight of this first release is the camera class.
The camera class is designed to work seamlessly with the game class provided by the game engine. It allows you to focus on one point at a time. It comes with a useful function just for centering on a set of coordinates. It also can be constrained to not pass too far off the screen. There’s much more to come as well.

The project’s page is located at


I began work today on a new game engine for use with Pygame. Right now, it only has classes and functions to facilitate cameras and camera movement. There’s also a working demo for the camera class. It is in a pre-alpha version and has many known bugs. Including ones as simple as making a background larger than the camera. But it seems more stable than many other engines out there.

Here’s an example of a simple use of the game engine:

from PyGameEngine import *

class NewSprite(GameSprite):


def main():
background = pygame.surface.Surface((800,600))
pygame.draw.line(background, (255,255,255), (0,0), (background.get_rect().width-1, 0), 9)
pygame.draw.line(background, (255,255,255), (background.get_rect().width-1, background.get_rect().height-1), (background.get_rect().width-1, 0), 9)
pygame.draw.line(background, (255,255,255), (0, background.get_rect().height-1), (background.get_rect().width-1, background.get_rect().height-1), 9)
pygame.draw.line(background, (255,255,255), (0, 0), (0, background.get_rect().height-1), 9)

game = Game(screensize=(800, 600), caption="PyGameEngine testing", background=background, bgcolor=Color(40,0,0), backgroundfixed=False, fullscreen=False, maxfps=30, debug=True)

spritesurf = pygame.surface.Surface((32, 32))
testSprite = NewSprite(game, image=spritesurf, bounds=Rect(0,0, 800,600))
game.centerOn = testSprite
testSprite.centerOn(Rect(0,0, 800,600).center)
testGroup = GameSpriteGroup(game, [testSprite])
game.playersprite = game.groups[0].sprites()[0]

if __name__ == '__main__':

I will upload the source code as soon as I feel it’s ready. I may upload a video of the working demo though.