Ashima IV

Splash screen/main menuI haven’t had much time to update here in a while, having been hard at work on an entry for the udevgames contest. If you read my earlier post, you may recall I was initially going to enter a pixel-art lemmings clone, but midway through development, I decided that the concept was basically not fun to play.

So I switched over to building a 3D space-sim, with only a single month remaining in the competition. The plus side was that I have much more experience with 3D graphics, but lack of time was still a killer. I can’t honestly say it is much more fun to play, given its unfinished state, but the core gameplay is certainly there.

The game is basically a prototype, and an example of a larger game produced with Python and Pyglet. As per the rules of the competition, the game is open source, although in its present state, it probably isn’t much use to anyone. When I have the time, I intend to cleanup and comment the code, which will hopefully be useful to others starting out with Python, Pyglet, or games development in general.

Space combatDespite the code being cross-platform, I only have a Mac binary up for now, as I have unable to coerce ODE into even a semblance of stability under Windows. When or if I manage to sort the crashes out, it will run fine on both platforms.

So if you have a Mac, and want to take the binary out for a spin, you can grab it from, or if you would like to browse the source, visit the project page at While you are about it, consider taking the time to check out the other entries to this year’s udevgames contest, and remember to vote for your favourites!


  1. I tried running Ashima from svn, but got the error below. Could it be a recent change in pyglet? I’m using the 1.1-maintenance branch of pyglet (like 1.1.3 but with a small bugfix or two), and python 2.5.1 on Mac OS 10.5.6 (Intel, Nvidea). I don’t know offhand how to find out what version of PIL I’m running with — if that might be the issue I can dig into it more.

    graphics card details:
    Chipset Model: GeForce 8600M GT
    Type: Display
    Bus: PCIe
    PCIe Lane Width: x16
    VRAM (Total): 512 MB
    Vendor: NVIDIA (0x10de)
    Device ID: 0x0407
    Revision ID: 0x00a1
    ROM Revision: 3212

    % python
    Traceback (most recent call last):
    File “”, line 11, in
    File “/Applications/pyglet/web-examples/darkcoda-ashima-read-only/src/”, line 58, in run
    File “/Applications/pyglet/web-examples/darkcoda-ashima-read-only/src/”, line 31, in enter_state
    File “/Applications/pyglet/web-examples/darkcoda-ashima-read-only/src/”, line 30, in start
    ship = factories.create_hammerfall(Vector3(0, -250, 2400), ‘red’)
    File “/Applications/pyglet/web-examples/darkcoda-ashima-read-only/src/”, line 257, in create_hammerfall
    e.engines = [engine(e, Vector3(0, -20, -830), 70.0, False), engine(e, Vector3(190, -20, -830), 70.0, False), engine(e, Vector3(-190, -20, -830), 70.0, False)]
    File “/Applications/pyglet/web-examples/darkcoda-ashima-read-only/src/”, line 64, in engine
    EngineFlare(entity, offset, size, Resources.load_texture(‘data/images/flare.png’))
    File “/Applications/pyglet/web-examples/darkcoda-ashima-read-only/src/”, line 149, in __init__
    self.sprite.renderables.append( Renderable( Sprite(size, size), Resources.load_shader(‘data/shaders/unlit.shader’), [texture], Pass.flares) )
    File “/Applications/pyglet/web-examples/darkcoda-ashima-read-only/src/”, line 15, in __init__
    self.vlist = len(verts)/2, indices, (‘v2f’, verts), (‘0t2f’, texcoords0) )
    File “/Library/Python/2.5/site-packages/PIL/”, line 301, in vertex_list_indexed

    File “/Library/Python/2.5/site-packages/PIL/”, line 379, in add_indexed

    File “/Library/Python/2.5/site-packages/PIL/”, line 434, in _get_domain

    File “./pyglet/graphics/”, line 146, in create_indexed_domain
    File “./pyglet/graphics/”, line 114, in create_attribute_usage
    File “./pyglet/graphics/”, line 232, in create_attribute
    AssertionError: Invalid attribute format ‘0t2f’
    Exit 1

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s