{"assets":[{"original":"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-10.41.53-PM-300x213.png","local":"\/data\/posts\/2013\/08\/428d0954f5c2516a80eb1f559e34a467.png"},{"original":"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-11.06.35-PM-300x232.png","local":"\/data\/posts\/2013\/08\/5047702c027c6135b5247cd7adabf8de.png"}],"author_link":"author\/jeffgmelton\/","author_name":"Jeff Melton","cat":"LD #27","categories":["LD #27"],"comments":[],"epoch":1377547860,"event":"LD27","likes":4,"metadata":{"p_key":"80033","p_author":"Jeff Melton","p_authorkey":"0","p_urlkey":"289043","p_title":"10 Seconds Until You DIE! Post-mortem","p_cat":"LD #27","p_event":"LD27","p_time":"1377547860","p_likes":"4","p_comments":"0","p_status":"WAYBACK","us_key":null,"us_name":null,"us_username":null,"event_start":"1377216000","event_key":"18","event_name":"LD27"},"source_url":"2013\/08\/26\/10-seconds-until-you-die-post-mortem\/","text":"<p>This is my post-mortem for my ludum dare entry 10 Seconds Before You DIE!\u00a0 The entry is <a href=\"http:\/\/www.ludumdare.com\/compo\/ludum-dare-27\/?action=preview&amp;uid=10874\">here<\/a>.\u00a0 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.\u00a0 Your \u2018health\u2019 is the clock which is maxed at 10 seconds and counts down.\u00a0 If a monster attacks you, it takes away even more time.\u00a0 You can gain time by killing monsters.\u00a0 As a programming challenge I wrote this all in plain C, no C++.\u00a0 I started with nothing, I did not reuse any code from any other projects.\u00a0 The only libraries I used were SDL2 and SDL image.\u00a0 I also did not use an IDE, just Sublime Text 2.\u00a0 I used gcc to compile the code and a simple make file to build it.<\/p>\n<p>\u00a0<\/p>\n<p><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-10.41.53-PM.png\"><img alt=\"Screen Shot 2013-08-26 at 10.41.53 PM\" class=\"alignnone size-medium wp-image-289670\" height=\"213\" sizes=\"(max-width: 300px) 100vw, 300px\" src=\"\/data\/posts\/2013\/08\/428d0954f5c2516a80eb1f559e34a467.png\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-10.41.53-PM-300x213.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-10.41.53-PM-550x390.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-10.41.53-PM.png 994w\" width=\"300\"\/><\/a><\/p>\n<p>No joke.<\/p>\n<p>\u00a0<\/p>\n<p><strong>What Went Right:<\/strong><\/p>\n<p>I was able to get into a pretty good flow in terms of programmer productivity.\u00a0 Most features did not take too long to get working.\u00a0 The one feature that did give me some trouble was the random map generation, which is still pretty simple.\u00a0 To save time, I used the famous Oryx tileset since I really wanted to concentrate on programming and game design.\u00a0 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.\u00a0 A few times I had to debug by throwing in some printf()\u2019s to output some variables to the console.\u00a0 I was happy working with SDL2 as well.\u00a0 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).\u00a0 I would have loved to have more time to polish the game as there are many flaws.\u00a0 Which leads me to\u2026<\/p>\n<p><strong>What Went Wrong:<\/strong><\/p>\n<p>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.\u00a0 This turned out to be more difficult than expected.\u00a0 A Windows build is still forthcoming.\u00a0 I ran out of time to implement collision so you and the monsters can walk through walls.<\/p>\n<p><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-11.00.28-PM.png\"><img alt=\"Screen Shot 2013-08-26 at 11.00.28 PM\" class=\"alignnone size-medium wp-image-289693\" height=\"237\" sizes=\"(max-width: 300px) 100vw, 300px\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-11.00.28-PM-300x237.png\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-11.00.28-PM-300x237.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-11.00.28-PM-550x435.png 550w\" width=\"300\"\/><\/a><\/p>\n<p>It\u2019s not a bug, it\u2019s a feature!<\/p>\n<p>Also, I only created one monster initially so I could go work on other things but ran out of time.\u00a0 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.\u00a0 I also wanted to randomize the floors and walls a little so it did not look so bland.\u00a0 I would have liked to have added the following: sound,music,title screen, and a restart button.\u00a0 I guess I need to code a little faster.<\/p>\n<p>\u00a0<\/p>\n<p>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.<\/p>\n<p>\u00a0<\/p>\n<p><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-11.06.35-PM.png\"><img alt=\"Screen Shot 2013-08-26 at 11.06.35 PM\" class=\"alignnone size-medium wp-image-289699\" height=\"232\" sizes=\"(max-width: 300px) 100vw, 300px\" src=\"\/data\/posts\/2013\/08\/5047702c027c6135b5247cd7adabf8de.png\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-11.06.35-PM-300x232.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/08\/Screen-Shot-2013-08-26-at-11.06.35-PM-550x426.png 550w\" width=\"300\"\/><\/a><\/p>\n<p>\u00a0<\/p>\n<p>As you can see it is not centered and way too small.<\/p>\n<p>\u00a0<\/p>\n<p>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.\u00a0 It pushed my coding skills to the limit and I was able to implement a game design pretty quickly.\u00a0 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.<\/p>","time":"August 26th, 2013 8:11 pm","title":"10 Seconds Until You DIE! Post-mortem","title_was_empty":false}