{"author_name":"pvwradtke","cat":"LD #32","comments":[],"epoch":1429990080,"likes":1,"metadata":{"p_key":"17644","p_author":"pvwradtke","p_authorkey":"3728","p_urlkey":"52949","p_title":"Mighty Magnetic Force \u2013 Post mortem & timelapse video","p_cat":"LD #32","p_event":"LD32","p_time":"1429990080","p_likes":"1","p_comments":"0","p_status":"UPD5","us_key":"3728","us_name":"pvwradtke","us_username":"pvwradtke","event_start":"1429228800","event_key":"27","event_name":"LD32"},"text":"<p>Hello everybody, pretty busy week, so I&#8217;m getting to do my <em>post mortem<\/em> only today. This time my entry is <a href=\"http:\/\/ludumdare.com\/compo\/ludum-dare-32\/?action=preview&amp;uid=3728\" target=\"_blank\">Mighty Magnetic Force<\/a>, an action\/puzzle game where the players control a magnetic sphere that can attract\/repel objects to destroy enemies. Below is my desktop timelapse for those crazy 48 hours to develop a game.<\/p>\n <p><iframe width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/SCOqDmKLQlo?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n <p>This is my 4th Ludum Dare game, though it&#8217;s the one I consider to be the best polished so far. To develop it, I&#8217;ve used:<\/p>\n <ul>\n <li>C\/C++ (though no C++ 11 this time)<\/li>\n <li>SDL2<\/li>\n <li>Chien2D v3.0 alpha (an educational game programming library I&#8217;m updating to SDL2 now)<\/li>\n <li>gcc and friends<\/li>\n <li>Code::Blocks<\/li>\n <li>SFXR for sound effects<\/li>\n <li>Punk-O-Matic for the music<\/li>\n <li>Gimp<\/li>\n <li>Inkscape<\/li>\n <li>Audacity<\/li>\n <li>Tiled<\/li>\n <li>mingW32 to make the Windows binary<\/li>\n <\/ul>\n <p>As usual, the game was developed on Linux (Mint this time) and cross-compiled to Windows. Surprisingly, the game was ready in time and I could do more or less everything that was planned. So, let&#8217;s see how this happened.<\/p>\n <h1>What Worked<\/h1>\n <ul>\n <li>I could <strong>decide an idea pretty much early<\/strong>, after playing around with a few concepts.<\/li>\n <li><strong>Working the mechanics first<\/strong>, so I was able to move around the character in the scenery and shoot objects fast. This way I could focus on fixing\u00a0small issues.<\/li>\n <li>Use place holder graphics, but <strong>decide the actual level data structure early<\/strong>. While I was working with a static, hard-coded level, it was using the level final data structure. When I did the level loader, I just had to fill in the memory with data.<\/li>\n <li><strong>Use a tool to design levels<\/strong> and configuration files to load them. I used Tiled to build the levels, which made it easy to do it visually.<\/li>\n <li><strong>Scale back<\/strong> some ideas, the original enemy was supposed to follow the player in what would be a level laid out as a simple maze. However, this became\u00a0impossible to do in time, and replacing them for something easier to code was the right choice.<\/li>\n <li>Develop standard code for multi-platform development (ANSI C\/C++). Compiling it for Windows was just a matter of changing a\u00a0Makefile to use the mingW32 gcc, instead of the regular system tool.<\/li>\n <li><strong>Get people to play it early<\/strong> to spot issues. Some levels were simply too difficult, and I couldn&#8217;t see it in the editor. My kids spent about 30 minutes playing it, and it was enough to chase away most level design issues.<\/li>\n <\/ul>\n <h1>What Will Work Better the Next Time<\/h1>\n <ul>\n <li>I was doing the compo and refactoring Chien2D, a game programming library that I used to teach games programming, back when I was in academia. The original library used SDL1.2+ OpenGL, and my goal was to have it fully refactored and uptaded for SDL2.0 by the time of LD32. I knew that the compo was the best place to force myself and make improvements to portions of the code that weren&#8217;t great yet. But it actually gave me some headaches.<\/li>\n <li>I had some issues with the SDL2 documentation. It was not so clear, at first, what was a rendering context, which seemed at first to be a backbuffer to draw. However, I quickly discovered it was only there to provide a way to draw to a window using the SDL2 accelerated video API (when there was texture artifacts\u00a0in my tiles). Once I realized I had to actually draw to a texture, everything went back in place.<\/li>\n <li>As part of my refactoring, I didn&#8217;t had a good collision code, so I had to improvise. the original version was large, clunky and didn&#8217;t work well. It took me a while to write a good version, which was 15% of the code used in the buggy version. Well, less is more, so they say.<\/li>\n <li>I was going to be\u00a0late, when I decided to scale back. and drop the &#8220;smart enemies&#8221; that could follow across a maze like place. If I had pursued this path, I don&#8217;t think the game would be done.<\/li>\n <\/ul>\n <h1>And That&#8217;s It!<\/h1>\n <p>So that&#8217;s my little story about making <a href=\"http:\/\/ludumdare.com\/compo\/ludum-dare-32\/?action=preview&amp;uid=3728\" target=\"_blank\">Mighty Magnetic Force<\/a> for LD32. Hope you guys enjoy playing the game as much as I enjoyed making it. I&#8217;m pretty happy with the positive comments so far. Yes, there&#8217;s room for improvement and some ideas are really great to improve the game\u00a0(thanks everyone!). I&#8217;m looking forward to the next compo in August and, until then, please stay with the official <a href=\"http:\/\/ludumdare.com\/compo\/ludum-dare-32\/?action=preview&amp;uid=3728\" target=\"_blank\">Mighty Magnetic Force<\/a> gameplay video :).<\/p>\n <p><iframe width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/5Ay1naMazos?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>","time":"April 25th, 2015 2:28 pm","title":"Mighty Magnetic Force \u2013 Post mortem & timelapse video"}