Skip to main content

Solar Sailor Post-mortem

Solar Sailor, for those of you who aren't yet aware, is a fairly simple racing game that I made for the Ludum Dare 48 hour challenge.

Here's the competition entry page:
http://www.ludumdare.com/compo/ludum-dare-23/?action=preview&uid=10456
Or you can get straight into it here:
http://dl.dropbox.com/u/25468009/SolarSailor/index.html
Making a playable game in just 48 hours is a pretty intense experience. This is my attempt to make sense of it all, with the benefit of a few days worth of hindsight.

What went right

I used Javascript and WebGL to write the game. Although I was fairly new to Javascript*, it turned out to be a great language for writing a game:
  • Built-in support for object literals (a.k.a JSON) made it very easy to get content into the game.
  • Being able to just hit reload in the browser to test out changes made for a very tight edit-run loop.
  • You effectively get image and font loading for free, thanks to the web browser. Sound too, theoretically, though I didn't get far enough to need that.
My content pipeline for the game came together really nicely towards the end. I was drawing the race track using Nuke's roto paint node and exporting it to JSON with a custom python script. Unfortunately it was about 2 hours before the final deadline by the time I got this in place. It would have only been a matter of minutes to add more tracks - but I didn't have time to make a menu system for choosing them.

Finally, using Dropbox as my web host was a really good choice. It meant that deploying the game was as simple as doing a recursive directory copy and almost instant. The time I didn't waste with upload forms I was able to spend working on the game.

What went wrong

I struggled to come up with an idea to fit the theme. I did some unsuccessful brainstorming after the theme was announced & didn't come up with anything too inspiring. I had a game in mind before the start of the competition, but I couldn't find a way to make it fit the theme & it just proved to be a distraction. I ended up starting to write code without a clear idea of the game I was making: big mistake. It wasn't until Saturday afternoon (about 18 hours into the compo) that I realised I wasn't getting anywhere. I took a walk away from the computer for a couple of hours to rethink & that was when I came up with the idea for Solar Sailor.

Once I'd got the idea for Solar Sailor, I decided I wanted a Geometry Wars kind of look for it: glowing polygonal outlines, simple shapes, etc. I wasted an awful lot of time trying to write a glow effect which ultimately didn't work, in an attempt to get that look. Worse still, I was doing this before I'd even got the most basic gameplay elements in place. As a result, the level design was left 'til the last minute & I didn't have time for any half-decent artwork.

After submitting the game, I got some people to try it out & they all had the same comment: WTF is going on?! If I'd done this playtesting earlier - if I hadn't been so preoccupied with writing glow effects - I would have realised that the game needed a tutorial. Badly.

Lessons learnt

Stick with Javascript & WebGL kiddo, you're onto a winner there. Ditto for Dropbox as a web host.

Don't start working until you've come up with a game idea that you actually like. Even if it feels unproductive, spending extra time thinking about the theme and what to do with it is a lot more productive than throwing away a days work and finding yourself back at the same point.

Polish doesn't make a game - gameplay does. Good gameplay can excuse bad graphics but the reverse isn't true. Especially glow effects. The main lesson is to always work on gameplay before trying to add graphical polish. Make it fun, then make it look good. It's never completely cut and dried, but that's a pretty good rule of thumb.

Comments

Popular posts from this blog

Assert no lock required

This is a technique I learnt about from Jason Gregory's excellent book, Game Engine Architecture (3rd Edition) . If you have a shared resource accessed by multiple threads, where you're fairly certain that it's only ever accessed by one thread at a time, you can use an assert() to check for this at debug time without having to pay the runtime cost of locking a mutex. The implementation is fairly straightforward: class UnnecessaryMutex { public: void lock() { assert(!_locked); _locked = true; } void unlock() { assert(_locked); _locked = false; } private: volatile bool _locked = false; }; #ifdef ENABLE_LOCK_ASSERTS #define BEGIN_ASSERT_LOCK_NOT_REQUIRED(mutex) (mutex).lock() #define END_ASSERT_LOCK_NOT_REQUIRED(mutex) (mutex).unlock() #else #define BEGIN_ASSERT_LOCK_NOT_REQUIRED(mutex) #define END_ASSERT_LOCK_NOT_REQUIRED(mutex) #endif Usage is equally straightforward: UnnecessaryMutex gMutex; void PossiblyOverlappingFunction...

OpenGL ES and occlusion queries

This is a follow-up to my earlier post "WebGL doesn't have query objects" . Since I wrote that post, the situation has changed a bit. It's still true to say that WebGL doesn't have query objects, but the underlying reason - that OpenGL ES doesn't - is no longer true. For OpenGL ES 2.0 , there's an extension which provides basic query functionality: EXT_occlusion_query_boolean  (which seems to have been based on ARB_occlusion_query2 from regular OpenGL). For OpenGL ES 3.0 , the functionality from that extension appears to have been adopted into the standard. The extension provides two query types, both of which set a boolean value to indicate whether any pixels passed the depth and stencil tests. While this is progress, unfortunately it's still not sufficient to implement the pixel accurate collision detection method I described in an earlier post. For that purpose it's not enough to know whether any  pixels passed the tests; you want to kno...

Triangle bounding boxes in a single byte

Just thought of a way to store the bounding box for a single triangle in only one byte. It's not really practical or something you'd ever really want to use, but what the hell. Assume we have some kind of indexed mesh structure with a list of vertex positions and a list of triangle indices:   struct Mesh {     std::vector<vec3> verts;     std::vector<uvec3> triangles;   }; We can find the bounding box of a triangle by taking the min and max of all three vertices:   vec3 Mesh::lowerBound(uint32_t tri) const {     vec3 v0 = verts[triangles[tri].x];     vec3 v1 = verts[triangles[tri].y];     vec3 v2 = verts[triangles[tri].z];     return min(min(v0, v1), v2);   }   vec3 Mesh::upperBound(uint32_t tri) const {     vec3 v0 = verts[triangles[tri].x];     vec3 v1 = verts[triangles[tri].y];     vec3 v2 = verts[triangles[tri].z];     return ...