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 http://www.udevgames.com/games/entry/ashima_iv, or if you would like to browse the source, visit the project page at http://darkcoda.googlecode.com. 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!

Advertisements

4 comments

  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 run.py
    Traceback (most recent call last):
    File “run.py”, line 11, in
    app.run()
    File “/Applications/pyglet/web-examples/darkcoda-ashima-read-only/src/app.py”, line 58, in run
    enter_state(GameState())
    File “/Applications/pyglet/web-examples/darkcoda-ashima-read-only/src/app.py”, line 31, in enter_state
    state.start()
    File “/Applications/pyglet/web-examples/darkcoda-ashima-read-only/src/game.py”, line 30, in start
    ship = factories.create_hammerfall(Vector3(0, -250, 2400), ‘red’)
    File “/Applications/pyglet/web-examples/darkcoda-ashima-read-only/src/factories.py”, 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/factories.py”, 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/ribbon.py”, 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/sprite.py”, line 15, in __init__
    self.vlist = pyglet.graphics.vertex_list_indexed( len(verts)/2, indices, (‘v2f’, verts), (‘0t2f’, texcoords0) )
    File “/Library/Python/2.5/site-packages/PIL/__init__.py”, line 301, in vertex_list_indexed

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

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

    File “./pyglet/graphics/vertexdomain.py”, line 146, in create_indexed_domain
    File “./pyglet/graphics/vertexdomain.py”, line 114, in create_attribute_usage
    File “./pyglet/graphics/vertexattribute.py”, 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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s