views:

361

answers:

1

I am currently writing an RTS for pygame and have written a number of modules on top of pygame for common things, such as efficient collision detection, a state system and more featured sprites. Now while writing games, except for Rect and Surface, I barely write any calls to Pygame itself.

When Googling around on this, I have not found anything that seems to actually take over from pygame for most of the game design. So, I was wondering if anyone else has used any engine built on pygame and found it good to work with. I was also planning on releasing the game and engine as open source, so I want to know how much others have done, and so what I should do or integrate into my engine.

+5  A: 

Well Pygame itself is essentially a Python wrapper to SDL calls. I think in essence you would just be wrapping a wrapper.

You could always build your own adapter API, but what in particular about Pygame's API do you dislike so much that you feel you need to separate it from your code?

I think your generic methods, like custom collision detection, could be separated out into its own engine module, essentially separating it from the rest of your game code, but essentially you are just layering on top of Pygame with this approach, not wrapping it.

EDIT:
Just as a follow up now that the question has changed. Short answer, no I'm not familiar with any. You may want to check out The Independent Gaming Source forums, those people seem fairly knowledge. Just make sure you post any answers you find back here.

Long answer, it could be possible that the "engine" space between the Pygame, which handles calls to SDL and I think some additional logic (like collision detection), and the game code itself is too small a space for anyone to write a generic library for it. Essentially different types of games have different engine requirements, and the generic parts of the engine that are shared across all game types seems to be covered by Pygame itself.

If you have written an RTS game in Pygame then you certainly could separate the RTS engine from your game logic, it would probably help your overall design by separating concerns. Also, it may be worth releasing that engine piece so that other people wanting to write a RTS in Pygame could benefit from it.

James McMahon