Mighty Magnetic Force – Post mortem & timelapse video
Hello everybody, pretty busy week, so I’m getting to do my post mortem only today. This time my entry is Mighty Magnetic Force, 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.
This is my 4th Ludum Dare game, though it’s the one I consider to be the best polished so far. To develop it, I’ve used:
- C/C++ (though no C++ 11 this time)
- SDL2
- Chien2D v3.0 alpha (an educational game programming library I’m updating to SDL2 now)
- gcc and friends
- Code::Blocks
- SFXR for sound effects
- Punk-O-Matic for the music
- Gimp
- Inkscape
- Audacity
- Tiled
- mingW32 to make the Windows binary
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’s see how this happened.
What Worked
- I could decide an idea pretty much early, after playing around with a few concepts.
- Working the mechanics first, so I was able to move around the character in the scenery and shoot objects fast. This way I could focus on fixing small issues.
- Use place holder graphics, but decide the actual level data structure early. 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.
- Use a tool to design levels and configuration files to load them. I used Tiled to build the levels, which made it easy to do it visually.
- Scale back 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 impossible to do in time, and replacing them for something easier to code was the right choice.
- Develop standard code for multi-platform development (ANSI C/C++). Compiling it for Windows was just a matter of changing a Makefile to use the mingW32 gcc, instead of the regular system tool.
- Get people to play it early to spot issues. Some levels were simply too difficult, and I couldn’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.
What Will Work Better the Next Time
- 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’t great yet. But it actually gave me some headaches.
- 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 in my tiles). Once I realized I had to actually draw to a texture, everything went back in place.
- As part of my refactoring, I didn’t had a good collision code, so I had to improvise. the original version was large, clunky and didn’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.
- I was going to be late, when I decided to scale back. and drop the “smart enemies” that could follow across a maze like place. If I had pursued this path, I don’t think the game would be done.
And That’s It!
So that’s my little story about making Mighty Magnetic Force for LD32. Hope you guys enjoy playing the game as much as I enjoyed making it. I’m pretty happy with the positive comments so far. Yes, there’s room for improvement and some ideas are really great to improve the game (thanks everyone!). I’m looking forward to the next compo in August and, until then, please stay with the official Mighty Magnetic Force gameplay video :).