13

What are some toolkits for developing 2D games in Python? An option that I have heard of is Pygame, but is there anything that has more range to do more things? What are the good and bad parts about the modules?

7 Answers 7

11

I use pygame myself and it is very good. It has good documentation and tutorials, and is quite well designed. I've also heard wonderful reviews of pyglet.

6

I have used and would highly recommend pyglet, which provides 2D sprite graphics, hooks into OpenGL effects, audio support, file asset management, and excellent text layout and display support (not something you always find in a 2D game library). The API is sane, well-documented, and easy to get started with, and goes deep (especially if you're an OpenGL wizard).

As a companion to pyglet, I have used and would also suggest Cocos2D, which adds scene management, improved sprites, tiled map support, and fancy (accelerated) effects to add a little polish. Cocos is still young, but taking shape quickly, and already has fairly solid documentation.

5

A blog post covering several of the alternatives, including PyGame, PyCap, SpriteCraft, and ika. I have also seen pyglet mentioned.

You may also want to look at Panda, which is a very easy to use 3D engine with Python bindings. It is used for rapid prototyping at Carnegie Mellon's ETC.

3

I think pygame is the standard for game development in Python, I don't know of any others. A book you may be interested in is Game Programming with Python, Lua, and Ruby. Not only does it cover Python (and, I believe, the pygame module), but it also gives you exposure to Lua and Ruby. It's also available on books24x7 if you have a subscription there.

1

Another option is pycap which is a wrapper for the popcap framework with Python.

1

If you're already familiar with using OpenGL in another language (probably C or C++) then PyOpenGL is awesome. I was surprised as to how easy it was to switch from OpenGL/C to OpenGL/Python. The performance isn't half bad either.

I've heard good things about PyGame and Pyglet though I must admit I haven't really done much messing around with either one.

0

I've only heard people talk about pygame. It has tons of followers & plenty of functionality.

Recently I saw this book at barnes & noble which I might check out one day. It looked good.

Not the answer you're looking for? Browse other questions tagged or ask your own question.