Sunday, May 27, 2007

Pygame

When choosing library for my snake game I decided to use pygame, which is a SDL binding for Python with a bunch of extra game related functionalities.

Why I decided to use this library is mostly because of the fact that as soon as someone in any forum mentions python and game development in the same sentence the phrase "try pygame" has a tendency to follow.

My first impressions of pygame was that it was really handy, everything is quite straightforward and really clean. Setting up the window and drawing some simple graphics is really quick and easy.

But the performance on the other hand is extremely poor, and the only way to get reasonable framerates is by using dirtyrects, and keep optimizing in mind all the time. As soon as bigger parts of the screen needs to be redrawn the fps dropped dramatically. This is a huge pain in the ass in my opinion. I don't think I'll ever use this library for a game again, at least not without combining with opengl or any other library to do the actual drawing.

No comments: