Post mortem of Omn Nom

Posted by (twitter: @_mathieu_muller)
December 8th, 2014 3:49 am

Hello all,

Omn Nom is my second entry for a ludum dare. The first entry (Connected Worlds) was done with HTML / Javascript, but for this one, I wanted to use something new: The MonoGame framework, based on Microsoft XNA’s one. I prepared my tools Thursday evening, struggling to install Visual Studio 2013 Community Edition due to low space on my system disk. However, I already had Visual Studio 2010 Express installed, so I told myself “Scrap VS2013, let’s use VS2010 Express!”.

I did some checks, trying to compile Monogame and run the basic game framework on my system. Everything was working fine, I though I was ready to start the ludum dare #31 the moment I would wake up on saturday morning (CET time here)… I was soooooo wrong!

Saturday morning

Waking up at 8am (yay, 4 hours less to code!), I check the theme… “Entire Game on One Screen”. Ewwww. Not inspiring at all, I think, and nothing comes up. Then my wife comes and tells me that I need to go fetch a christmas tree, throw the garbage at the local waste disposal, and take a package from the local post office. “Why not?” I say, I usually have ideas when I’m doing completely something else.

It’s now 11am… and I still don’t even have a start of an idea. I’m beginning to panicking, thinking of giving up; for my first ludum dare, I had the idea within 5 minutes, so I’m really worried if I can still do something within the 48h timeframe of the compo… my first idea come juste before lunch: a top view tank game in a city where the player need to kill other tanks.

I start to code and… wait, how to add assets in MonoGame? Searching a bit, I tumble upon the MonoGame Content Project… which my version of VisualStudio 2010 Express refuses to instanciate. Looking up on the net, this problem is known with my version of Visual Studio. Screw it! How to fix this now? It’s 1pm and I didn’t even start one line of code.

Some people suggest to use an external content pipeline, like XNB Builder, available on sourceforge. I try it, compiling some textures, and adding them to my project. It works, but the process is very tedious. Now, back to the code.

Saturday afternoon

I recover old code files from my XNA tutorial website, mainly code to handle basic stuff like input components, basic graphic components, and so on. At least, this code is still working and was pretty well tested when I coded it some years ago. Now, I need a level. How to load level data? The answer is XML definition files, supported natively by XNA. But I first need a level editor, and I start to work on it (i thought that manually editing XML files would be very tedious, and prone to errors). One hour after, my HTML/Javascript level editor is ready (thanks jQuery!) and generates a standard XNA XML definition file…

Which I can’t load in the XNB Builder! The program refuses completely to compile my XML asset certainly due to missing references to the data structure… Since I already had to install XNA 4.0 to make XNB Builder work, i thought: let’s use XNA 4.0! I know that XNA 4.0 is working flawlessly with Visual Studio 2010 due to my previous experiments. I close the project, create a new project with the XNA 4.0 Windows game template, reimport all my code and assets… and everything compiles and run perfectly!

Now, I’m still thinking about my tank game, and I want them to run in a city street’s. I start to draw in some kind of pixel art a tank hull, and road chunks. After I finished I’m thinking: “That’s OK for my skill level in drawing”. I draw the streets in my level editor, loads up the XML in my game and the streets are showing nicely.

Saturday evening

Next step: control a tank hull throught the streets. I’m going back to code, implementing base movement throught arrow keys, and collision detection. Ideally, I’d like to control the tank turret with the mouse, but this means I will have to implement a better collision detection than purely cell based collision detection. This means that I still have a lot of code to implement, half of the compo time has been used, and I plan to sleep tonight. I face a decision: either I sacrifice some of the core gameplay, either I change everything so I’ll have less code to do.

By chance, after testing what I already did, the gameplay did feel like something I already played in the past… PAC-MAN! Despite of the “tank in a city” skin, the basic gameplay was exactly the gameplay of the old good fashioned pac-man. And Pac-man didn’t have to deal with turret, mouse control, and/or bullets. So much for that for the “Innovation” part of the notation, i’ll do some kind of a Pacman clone. I took the end of the evening to redo the graphics, The pac-man, and the paths for the level: this time, I want to draw something with a “Tron” feeling: every item, path, and mobile would have some kind of neon glow.

Sunday morning

Waking up at 8am, with a good night sleep, I feel confident that I can at last finish the core of my game. I post the first screenshot of my game on my twitter account:

First screenshot of my game entry for the Ludum Dare 31

I have to take care of enemies: my game without enemies would be dull to play, so I implement a really basic random based I.A. which I think would do the trick. A.I. is never simple, and my first iteration of the ghost A.I. simply did turn around in circles, without ever going to the center of the labyrinth. Back to the drawing desk!

The second iteration of the A.I. is much better: at each cross, it’ll evaluate possible directions, and pick one random. “That’s sufficient for now!” I tell myself, but I promise to implement a better one based on the player’s position if I ever have enough time.

Sunday afternoon

Running around in a labyrinth is fun, but my game is still missing core mechanics. And a start screen. Which needs to be in the same screen, due to the theme of the compo. And sound. And power-ups. And music. So much to do, and so little time to do it. First, implementing a scoring system and a life system, so the game can end and the player can score. This is relatively easy to set-up, just and two variable to keep track of the lives and score. I draw a heart and number in the same fashion as the other items of the level, with some kind of glow.

For the first time, I sense that I may finish in time. Next thing to do: sounds. My first game for the ludum dare didn’t have any sounds at all, and this is a topic where I am not really easy with. Speaking with a friend online, he suggest me the name of the game “Omn Nom”. Simply brilliant! I start to make sounds with my microphone (yes, the “nom”, “wee”, and “ouch” sounds are all voiced by myself :D), distort them a bit to make them less “human”, and add them to the game.

Fortunately, XNA makes playing sounds very easy: load the asset in a SoundEffect, and just call Play() whenever needed. It’s time to test the game… and it’s maybe the first time I had to giggle so hard when coding. The “nom nom nom nom” was just SOOO right when the player was eating the littleĀ  dots. I tell my friend: “You HAVE to listen to this!”; it was also a way to me to test the Visual Studio 2010 packaging system, and ensure that everyone could install the game on their home computer.

Next step, the music. Well for this, I have to “remix” some title that was just perfect for the theme: The Heavy Omn nom Theme. It’s completely fubar, hits you on the nerve, especially since I made it some kind of chipmunk song by pitching the voice and accelerating the music. And it’s just perfect for the set of power ups that I have planned for the game.

But first, I still have to implement some kind of menu system to start, pause, and exit the game. I used the center zone of the game which need a special set of movement to attain to put theses commands: a blue play triangle, and a red stop square. When the player moves on it, it starts or quit the game. Moving on the play command will show the pause command instead, so the player is able to pause the game.

I promised myself to work again on the A.I. I take two hours of my time, thinking that the evening will be sufficient to implements all, or at least some of the power-ups that I wanted to put in the game. Believe me, these two hours were the most wasted hours of my precious time. I’m unable to create a more intelligent ghost, that finds the best way to the player. Yes I know A* algorithms, but I thought myself: “I don’t have the time to implement and test A* in such a limited time-frame”.

I end by adding 3 ghosts instead of one in my game. That does the trick. And the “random movement” algorithm is sometimes surprisingly following the player, giving the feeling of a real intelligent pattern behing (and sometimes, ghosts are really dumb, missing the player which is in the next cell).

Sunday evening

It’s power-up time! The first power-up that I implement is the heart that gives you an additional life. It’s also time to implement safe bounds checks to the score and lives count. The next power-up is the invulnerability power-up, that allows the player to hit ghosts without losing a life. Those two power-ups are almost implemented, as invulnerability is given to the player whenever he lose a life.

Remember that music that hits you on the nerves? The next power-ups I implement are “stop the music” and “start the music” (which is more some kind of power down, imho :D). It’s fun to control the meta game within the game, and I find myself surprisingly avoiding the “start the music” power-up (I really have enough heard the music…).

Next, the “overdose” power up that slows you down. Because it’s to big. And you need to digest. While the ghosts are chasing you. Another “power-up”: A block that closes a path (yes, you can be stuck…). And the last: bonus points power-ups shown as an apple. It’s now midnight, I’m sleepy, and I don’t have the time to finish the end screen (when the player hits 0 lives). It’s time to publish my game on the ludum dare website!

The finished game

Ending notes

I really lost plenty of time due to the ininspiring theme… and my non-working tools. Also, I priorize family life before anything else; I make this for fun (and to teach myself new things). The things I would have the time to do:

  • The better A.I.
  • Color based “keys” that allows the player to go throught special colored block. The player would “eat” the key, change to the color of the key, and then be able to move thought level parts that had the same color as the player
  • Color based ghosts that would have the same powers as the player
  • More weird power-ups (was thinking of some kind of teleporter, freeze mines against ghosts and the player, combo power ups with colors)


Leave a Reply

You must be logged in to post a comment.

[cache: storing page]