10 Seconds Until You DIE! Post-mortem

Posted by (twitter: @jeffgmelton)
August 26th, 2013 8:11 pm

This is my post-mortem for my ludum dare entry 10 Seconds Before You DIE!  The entry is here.  The game is a simple rogue-like-like where the objective is to keep moving through the dungeon and killing all the monsters you encounter.  Your ‘health’ is the clock which is maxed at 10 seconds and counts down.  If a monster attacks you, it takes away even more time.  You can gain time by killing monsters.  As a programming challenge I wrote this all in plain C, no C++.  I started with nothing, I did not reuse any code from any other projects.  The only libraries I used were SDL2 and SDL image.  I also did not use an IDE, just Sublime Text 2.  I used gcc to compile the code and a simple make file to build it.

 

Screen Shot 2013-08-26 at 10.41.53 PM

No joke.

 

What Went Right:

I was able to get into a pretty good flow in terms of programmer productivity.  Most features did not take too long to get working.  The one feature that did give me some trouble was the random map generation, which is still pretty simple.  To save time, I used the famous Oryx tileset since I really wanted to concentrate on programming and game design.  I thought I would throw bad pointers a lot since I had not programmed in C in awhile but this only happened a few times and I was usually able to debug the problem relatively quickly.  A few times I had to debug by throwing in some printf()’s to output some variables to the console.  I was happy working with SDL2 as well.  The setup is pretty easy and the performance is great now that it uses hardware acceleration for sprites (compared to SDL 1.2 which used software to blit sprites to the screen).  I would have loved to have more time to polish the game as there are many flaws.  Which leads me to…

What Went Wrong:

I spent a few hours Friday trying to get SDL2 setup in Visual Studio Express 2010 as I figured most people have Windows machines so a Windows build was a priority.  This turned out to be more difficult than expected.  A Windows build is still forthcoming.  I ran out of time to implement collision so you and the monsters can walk through walls.

Screen Shot 2013-08-26 at 11.00.28 PM

It’s not a bug, it’s a feature!

Also, I only created one monster initially so I could go work on other things but ran out of time.  It would be easy to add more monsters by setting up another sprite definition that is just the x ,y, width,and height of the cell in the sprite sheet.  I also wanted to randomize the floors and walls a little so it did not look so bland.  I would have liked to have added the following: sound,music,title screen, and a restart button.  I guess I need to code a little faster.

 

I only finished text rendering for the numbers, not characters so with 10 minutes left I implemented the worst kill screen in the history of video games.

 

Screen Shot 2013-08-26 at 11.06.35 PM

 

As you can see it is not centered and way too small.

 

All in all I consider this a success as it was a major coding challenge for me starting from scratch and using plan old C code.  It pushed my coding skills to the limit and I was able to implement a game design pretty quickly.  I am sure there are many other games that blow mine out of the water but I had a blast making this and learned a lot along the way.


One Response to “10 Seconds Until You DIE! Post-mortem”

  1. Senevri says:

    I also have had no success getting SDL2 + Visual Studio working nicely together. I’ve gotten something to compile, but then I tried adding SDL-mixer and other libraries, and, well, that was the end of that.

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]