Thieving Fingers – Post Mortem

Posted by (twitter: @stuckieGAMEZ)
August 23rd, 2011 1:45 pm

“Hold on a minute… ” I hear you cry, “that game wasn’t submitted!”
Indeed it wasn’t… for if I had not been chasing imaginary rendering bugs two hours before the Jam deadline, it would have been.
There’s logic in restarting your machine now and then…

Anyway, the curious can still play it, as links and stuff will be provided at the end.
For now, sit back and listen, for I have quite a tale to tell….

 Deciding that being overly tired is bad and produces silly mistakes, I decided to sleep normal times on the Friday and woke up about 6am on the Saturday – three hours after the theme had been announced. Ironically, after going through the theme list before heading off, I actually quite liked the look of Escape and had inadvertently designed the game before going to sleep, so was rather surprised to see it when I woke up! As such, I dove right into code.

Speaking of which, I brought along a bit of base code… the little bits of an engine I had been working on, complete with shiny new Resource Manager that I had just fixed the previous day.
Or so I thought.
Well.. actually, I had.. but I had not committed it to the repository, so when the bugs started appearing, I was none the wiser that the fixed Resource Management code wasn’t actually in until I noticed some parts were missing and went checking on my other machine.
I think in total, the Resources stuff was rewritten a good three or four times this weekend… so that’s black mark number one.

Saturday went about as well as you could hope, considering the major bits of my framework were quite broken and needed rewriting… I managed to load up something though, and make a start on the framework for the game itself along with a SpriteFactory to take in a good old fashioned Sprite Sheet ( or Texture Atlas if you want ) and split it up into a bunch of meshes; so I got something on the screen at least and a bit of movement with the mouse.

The game I was aiming to make harkens back to the 8bit days of flip-screen rooms with a larger scrolling area to run around in. Each room filled with traps and things to kill you. Your job, as a thief named “Fingers,” was to test the security of a Mansion on the owner’s behest. You had to steal the Star Diamond – a large and priceless artefact – while avoiding the security system. If you made it out, you got to keep the Diamond and anything else you might’ve pocketed on the way. They didn’t go into much detail on what would happen otherwise, but as you hadn’t failed a job yet, you didn’t put much thought into it… least you didn’t till you saw the spikes, crushers, spotlights and pressure pads that awaited you just as the main door slammed behind you.

Here lies black mark number two. Due to the engine being very young, there’s no real data pipeline, so everything ended up hard coded into it. There’s also no bound scripting language as I had in my previous engine, so iterating room and trap logic was highly tedious… I reckon I probably could’ve bound Lua and still done a better game in the same amount of time. Assuming the other bugs hadn’t caught me that is!

Sunday comes around and I pick up where I left off… some stuff on the screen, basic controls, and a camera that follows the player around.
I then began working out the logic for the rooms.. deciding that I’d have three floors, each with 7 or 8 rooms interlinked. Obviously having not learned from Derelict and Moons of Subterrane that planning out lots of content is always a bad idea! Black Mark Three!
The morning was spent again wrestling with the Resource system… and were it not for a feint glimmer of hope when the Room framework started to work nicely, and I was able to traverse the Mansion, I’d have given up here.
The afternoon rolls round, and I lay out a plan of action… detailing what was missing and what I drastically needed to do to try squeeze it into the Compo.

  • Traps.. any traps.. just something to kill the player!
  • Ability to push stuff around – particularly the titular Star Diamond we’re meant to be after.
  • Puzzles would be nice to keep the player involved.. though this comes in with the Traps.
  • Probably need to cut down the size of the Mansion.
  • Game Over/Completion State
  • Keyboard Controls
  • Fix this worrying frame rate issue that’s starting to appear….

By the Evening, I did have a couple of traps in, and some basic enough physics to detect collisions and push things around as needed. I had also drawn everything bar the Game Over and Completion graphics that I’d needed, as well as put in the Keyboard Controls making it much easier to deal with ( rather than dragging the character around with the mouse as I had, and still do if you want to try it! )
However, the frame rate was steadily plummeting for no apparent reason.. so all my efforts suddenly started to focus on that…but as the deadline for the Compo loomed, I decided to postpone it to the Jam.. and get some sleep as a fresh mind might spot something wrong quicker.

Now, I hadn’t really planned on pushing it into the Jam originally, so I hadn’t much of a plan for Monday short of sleeping, and fixing another black mark – that the engine only currently works on Linux; there’s no support for Windows, Mac, or anything else ( apart from the Pandora… though I haven’t tested if the game runs on one.. I’d imagine it should though. ) There’s no Sound support either  – which is yet another black mark – and something I had planned on doing on Sunday. In fact, my plan was framework and engine bits on Saturday, content and extra bits on Sunday, quick port and sleep on Monday.

Anyway, Monday was rather worthwhile actually, as I implemented about half a dozen trap types and started cleaning up the code a bit to try make room generation somewhat less painful. It was also clear that my resource management system, which I had designed to be simple, was utterly broken and was insanely complex if I wanted to keep track of anything. The fact I had to have a helper struct to find things through the Resources system says enough, I think. By the evening I was making great strides, and as long as I didn’t draw too much on the screen, the frame rate was bearable.. I had also tested it on my main desktop machine at this point and it ran full speed, so I was putting it down to my laptop being a bit old ( and being the same one I used in LD11! )
That said.. when it suddenly started chugging at single digit FPS… I dragged out gDEbugger and had a poke to optimize everything I could… I managed to get it up a bit to 10FPS, which was enough to finish four rooms, and stuff the Star Diamond in another room with a single lowly health pack to help you on your way back.
Oh yes… you had to push the Star Diamond back through the Mansion to escape with it.
Think yourself lucky that the version I’ve linked here only has five rooms, and only one of them is really going to cause you trouble, as that’s the main one you have to go through with the Star Diamond.

An hour before the deadline, however… I gave up.

I couldn’t get it running any faster… it just was not playable in it’s current state and I couldn’t fathom why… so I didn’t submit it.
I now regret this in hindsight, as this morning when I turned the laptop on, it ran in a frame without any hassle. I shall point out that during the weekend, the laptop was not reset once.. it ran constantly… so the only thing I can think of to have caused it was my graphics driver going a bit funky and getting itself into a state it couldn’t get out of until I restarted; as I had been checking for rogue processes to kill when the FPS originally started to fall and found nothing.

Oh well.. it’s the experience which counts! but I could’ve been lucky 600!

Should you want to play Thieving Fingers, you can do so from here: http://www.stuckiegamez.co.uk/gamez/ludumdare/ld21/ where a bunch of screenshots are also included.
It’s been compiled on 32bit Debian Lenny so should run on most things as the only dependency is OpenGL.. if not, the entire source is also available here: https://stuckieworld.net/publicsvn/ludumdare/LD21/ … just ignore that self-signed certificate 😉
There is an amusing oddity on 64bit machines though.. because I’m using floats to store delta time, and I optimized things a bit much.. the delta can alias to zero and you get a stutter. It took me a while to figure out what it was too as obviously sticking in printfs and suchlike is going to slow it down!.. but yes, the game runs so fast, it aliases a float… that’s optimization!

Will I know better for next time? Perhaps… scary thing is though, I almost made it.. if I hadn’t been dealing with the resource system as much as I had, I’d likely have finished it in time for the Compo… and if I had reset even just each night.. I probably would’ve submitted for the Jam.

Oh well… for now, it’ll sit in peace for a while, until I brave the courage to go back in and redo the resource system once more…


5 Responses to “Thieving Fingers – Post Mortem”

  1. johnfn says:

    Wow dude, that ending is incredibly painful. Since you did finish the game in 48 hours, you just didn’t think you had, maybe you could message the moderators about it?

  2. stuckie says:

    Nah it’s fine :)
    I didn’t quite have anything playable by the end of the 48 hours, but the 72 hours certainly had something ( and the SVN logs can be checked for this as the final commit was 02:50:17 +0100 .. ten minutes before the deadline in the UK! ) but it’s my own stupid fault for not checking my own stuff properly, anyway!

    Still, the experience wasn’t a waste as I got to put my engine framework through a trial by fire. It failed 😀 but I can fix it up for next time so hopefully I do get something submitted in time 😉

  3. johnfredcee says:

    Never mind, given this experience you should be able to knock the ball out of the park on the next LD!

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]