Fork me on GitHub

Void Switched to Pyglet and Box2D

10 Feb 2009

Void started out as a retro space shooter. It’s not really a shoooter any longer. It’s still set in space, however, and it’s still retro. Well, it certainly isn’t modern. I started writing Void in December. Having started a few over-ambitious game projects in the past, I decided to go for something simpler instead. Enter Void. Enter the Void. Here is the Void — enter it. Never mind. At the moment, Void is a free-form game where you cut asteroids into pieces with your frickin’ laser beam and tow them around. Now all I need is a way to (a) win the game, and (b) lose it, besides flying off the map.

What a great intro. But I meant to write less about Void and more about Pyglet and Box2D. When I started writing Void, I wasn’t very good at OpenGL, so I went with Pygame sprites instead. This wasn’t a bad decision at the time, because it gave me quick results and some momentum. However, those quick results turned out to be quite slow, especially on my performance-challenged netbook.

During a Christmas hiatus from Void, I improved my OpenGL skills by writing Tics. After that, I felt more than ready to rewrite Void to use OpenGL. I also switched Void from Pygame to Pyglet, after hearing good things about Pyglet from my fellow code jammers Mattias Brändström and Oscar Lindberg. I’m very happy with the switch. Pyglet is cleaner and easier than Pygame for OpenGL programming. Oscar was looking into rewriting Tics to Pyglet, which would be great, but I think he got stuck.

Next on the agenda was deciding on a 2D physics library, what with physics simulation being all the rage these days. I looked into Chipmunk and Box2D, initially leaning toward Chipmunk. I ended up going with Box2D instead, again on recommendation from Mattias. I’m truly blessed with knowledgeable friends. Both Pyglet and Box2D should come in handy in many a future project.

Latest Blog Posts