Skip to main content

Project Tethys Post-mortem

Project Tethys was my entry for Ludum Dare 29. Here's the elevator pitch:
Project Tethys is a fast-paced underwater 2D shoot-em up inspired by the likes of Defender and Resogun. You control an advanced combat submarine tasked with defending an underwater research facility against an invading army. If you enjoy classic arcade-style action, this game is for you!
So far the game has been getting pretty good feedback. It's the most polished entry I've ever submitted for a Ludum Dare and the one that I'm most proud of so far. Here's what it looks like in action:

I've carried on working on it since the end of the competition, fixing some of the problems people have commented on and adding more of the features I'd originally planned. Expect another post about that when I'm ready to release it.


  • Unity 4.3 (free version)
  • GarageBand for iPad
  • bxfr
  • Nuke 8.0 (specifically the ModelBuilder node)
  • Paint.NET
  • VLC

What went right

  • Making a game I wanted to play! Helped me stay motivated and to be more critical when testing it, leading to a better game overall.
  • Using Unity. This was my first time using Unity and it was awesome! So much quicker than the hand-rolled javascript framework I'd been using for my previous LD entries. It allowed me to concentrate on the game rather than the tech.
  • Choosing a look that I could handle. The art style & setting only needed simple 3D models with no animation or rigging, which are things I suck at so I was glad to avoid them. Dynamic lighting makes it all look good anyway.
  • Time management. I had something playable by the end of the first day & spent the second day adding content and polishing it. At the end of the second day I stopped working on gameplay elements and started adding the bits around the game (titles, help, high scores, etc.).
  • Music. GarageBand on the iPad is an awesome way to quickly create music for game jams. Also, I've played around with it before so at least had some idea what I was doing.

What went wrong

  • Familiarity with Unity. Because it was my first Unity project I had to spend a fair bit of time watching tutorials and reading docs during the competition. If I already knew all that stuff I'd probably have had time fit in more of the enemy and power-up types I'd planned.
  • The explosions. That was a noob error: I should have ticked the box in Unity to make them 3D sounds, so that the ones further away weren't as loud. Oh well.
  • No radar or minimap. The game really needs one: without it you can't tell where the enemies are approaching from or where the power-ups are falling. I kept putting off doing this during the competition (because I wasn't sure how to do it), but I should have listened to myself.


  • Make a game that you want to play. It's a lot easier going if you do.
  • Keep using Unity!
  • Learn your tools ahead of time, so that you don't waste time learning them during the competition (and don't make noob errors).
  • Day 1 is for gameplay, day 2 is for content & gameplay refinement, the final few hours are for polish and completeness.


Popular posts from this blog

Octree node identifiers

Let's say we have an octree and we want to come up with a unique integer that can identify any node in the tree - including interior nodes, not just leaf nodes. Let's also say that the octree has a maximum depth no greater than 9 levels, i.e. the level containing the leaf nodes divides space into 512 parts along each axis. The encoding The morton encoding of a node's i,j,k coordinates within the tree lets us identify a node uniquely if we already know it's depth. Without knowing the depth, there's no way to differentiate between cells at different depths in the tree. For example, the node at depth 1 with coords 0,0,0 has exactly the same morton encoding as the node at depth 2 with coords 0,0,0. We can fix this by appending the depth of the node to the morton encoding. If we have an octree of depth 9 then we need up to 27 bits for the morton encoding and 4 bits for the depth, which still fits nicely into a 32-bit integer. We'll shift the morton code up so t

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

Faster morton codes with compiler intrinsics

Today I learned that newer Intel processors have an instruction which is tailor-made for generating morton codes: the PDEP instruction. There's an instruction for the inverse as well, PEXT . These exist in 32- and 64-bit versions and you can use them directly from C or C++ code via compiler intrinsics: _pdep_u32/u64 and _pext_u32/u64 . Miraculously, both the Visual C++ and GCC versions of the intrinsics have the same names. You'll need an Intel Haswell processor or newer to be able to take advantage of them though. Docs for the instructions: Intel's docs GCC docs Visual C++ docs This page has a great write up of older techniques for generating morton codes: Jeroen Baert's blog ...but the real gold is hidden at the bottom of that page in a comment from Julien Bilalte, which is what clued me in to the existence of these instructions. Update: there's some useful info on Wikipedia about these intructions too.