Here is a summary of technologies used in implementing The Ditty of Carmeana, which I am doing mostly for the sake of not having a completely empty blog.
The Ditty of Carmeana is written mostly in Python 2.7. I don’t mean that Python is the scripting language: the whole game is written in Python. I used C to implement a few things that are time-critical: graphics, audio, and collision detection, but everything else is Python.
It makes use of PyGame for what might loosely be described as platform-independent interface to the windowing system and the inputs. (Speaking of inputs, you should play The Ditty of Carmeana with a gamepad. I think it’s a much nicer experience.) PyGame’s gonna be gone next iteration. It’s crufty, and I don’t like how it does event looping. I’m now looking a Kivy, which might also make it easier (though no picnic) to port the game to Android. And iOS I suppose.
It does not, incidentally, use PyOpenGL. There are very few things in this world I hate more than PyOpenGL. (One of them is sweaters, another is Adolf Hitler. In that order.) Instead I wrote my own wrapper to OpenGL in C, one that queues commands to make streaming vertices and textures more likely to work in the background, in theory anyway. Also, it’s kind of embarrassing, but right now the game uses the OpenGL fixed pipeline. (Well, I started writing the game in 2006 when shaders were this newfangled thing, and so far it’s sufficed, but it’s still embarrassing.)
Other libraries I make use of are Pango (which, incidentally, I hate more than PyOpenGL) for text layout, Soft OpenAL and Ogg/Vorbis for audio, a hoary old library called Cal3D for skinning (which is written in C++ and unfortunately means my game is not Certified C++ Free™), and Numpy. I’d like to replace Pango but I don’t know with: most libraries aren’t strong enough to lay out paragraphs; others (such as webkit) are way overkill.
The toolchain is also entirely in Python. All my 3D assets are in Blender, and a Python script runs inside Blender to output the scenery in the format used by my game. Sound assets are all converted to OGG format. I probably should have used WAV files for sound effects but OGG seems to be working fine.
On the use of Python: I was able to work with it because I am an expert and know how to get the best out of it, but it has some serious problems that will not allow the game to scale up:
- It’s slow
- It is limited when it comes to threading
- It has some annoying problems with dependencies
As such, if I were to get really serious about bringing The Ditty of Carmeana to the next level (like, quit-my-job-to-work-on-it-full-time serious), my intention is to rewrite the game in C# using the Unity engine.