[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] TOJam 0.9: Pygame framework needs testers/feedback



A bunch of us are organizing a local 3-day Indie Game Jam in Toronto (http://www.tojam.ca) and so we(okay, mostly just me) decided to build a Python/pygame framework as a starting point for participants. I'm looking for general feedback and to see if anybody else can understand it ;-)

http://www.pair.com/voxel/TOJam.zip

The above is really a demo game built around standard Python classes and I highly suggest using a joystick to play with the sample game.

The design is pretty basic:

- A collection of singleton "manager" classes wrap pygame.
- A finite state machine controls game modes (determines whether you are in the main menu, in the first level, etc.). Each mode has a enter, tick, draw, exit.
- All rendering happens in the Renderer classes.
- All simulation happens in the Simulator class.
- Objects do not know how to do compute physics, determine collisions and they do know how to render themselves (data driven vs. OO).
- Objects are placed in a "GameSystem" which decides which object should be simulated + drawn by their "alive" flag.
- Objects can collide(invisible collision objects), simulate or render(non-interacting objects) or all combination of the three.
- All objects are processed through a camera before rendered which can be slow.
- Many of the classes are singletons.

For example "GameSystem" is a singleton and a global. A player can add a particle system into the GameSystem and let it live and die without controlling it directly.

Due to my inexperience with Python, some of the class inheritance structure is rather ad hoc.

Features that I plan to add:

Collision response
Spatial sorting data structures
Better(stable) physics
Centralized menu renderer (blits should happen in one class)
Optimizations using Numeric + Psyco + OpenGL
Optimize the 2D rendering using OpenGL(?)
Basic networking
ODE-based physics (a fellow TOJammer got this partially working)

Eventually, everything will be released freely for other game jams and game programming events to use.

Nelson
http://www.tojam.ca


New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.