Kraken Smack Postmortem

This past weekend I had an opportunity to participate in my first 72 hour game challenge. The goal is to make a computer/video game in 72 hours. The topic is announced at the beginning of the content, and in this case, we were allowed to use whatever existing code we already had.

The GDNet Weekend Community Contest

I had heard of these sorts of things happening before, but I never really had the guts to do one – especially since I had never actually ever made a game with any sort of substantial gameplay in it. I had participated in the GDNet 4 Elements contests several years ago (well, more like 10 years ago!), but they didn’t really require any sort of actual gameplay.

I really didn’t have any valid excuses to not participate this time around, so I did it.

The topic was announced Friday morning, but unfortunately all I could do was learn what the topic was – I was at work until 5:30 pm or so. Despite not being able to start coding right away, I started thinking about what I wanted to do. I knew I was going to have to keep it simple – really simple – if I had any hope of finishing any sort of entry.

My original idea was called “Kraken Smack”. The idea was that you play the role of the kraken, and you have to ‘smack’ your tentacles down on objects that are attacking you – scuba divers, submarines, etc. Eventually you would work your way to the surface and destroy a ship. You would also have to avoid hitting certain objects that could hurt you – torpedoes, depth charges, etc.

Friday night I got a grand-total of about half an hour of coding in before I ran off to a social event. During that time, though, I was able to hook into an existing framework I had. It was sort of a mutant version of the Game Screen Management sample. In that time I was able to get one crude image up on screen.

Saturday morning I started back on things. By morning, I really mean about 10:00 am, as I was out quite late the night before. In the morning I was able to get some basic menu choices up, as well as tentacle waving around the screen. It wasn’t much, but it was something. It was early in the afternoon that I was about ready to give up. With my original plan there was no way I was going to be able to finish what I wanted to do unless I dumbed things down. Also, right about that time my 2 year old niece wanted to play, and I had a few errands to run.

I got back around 4:00 pm, and decided to throw in some completely useless but still fun bubbles in the main screen. At this point I still didn’t have any real gameplay, so I figured I had better work on that. The rising bubbles gave me an idea – what if rather than smacking specific objects with your tentacle, you just sort of wave it around to catch falling junk? Easy enough – it’s basically the bubbles in reverse with a tiny bit of collision detection. I implemented the bubbles in reverse, and it looked decent enough. I hacked up some crude collision detection using the mouse position and the position of the falling pieces of garbage, and it started to come together. By the end of the night I had everything together (except a few bugs – one or two of which are still in there!). I wasn’t going to be doing any coding on Sunday, so I uploaded everything as it was. In the end, I was fairly happy with the finished product, given that I’d had a little over 24 hours to work on it, and it was the first thing I had coded with actual gameplay in ages!

So… this being a postmortem, I should probably break it down into what went well vs. what went not-so-well:

What Went Well:

  • Using an existing framework. I was actually really surprised at how fast it was to slap up some new screens to show the story, or to set up a new page to select the difficulty. (It probably helps that I had set up some templates in Visual Studio to create new game screens with two clicks and a few keystrokes – a definite time saver!). There is no way I would have even come close to being able to finish if I didn’t have the existing framework.
  • Dumbing things down. If I would have stuck with my original idea, there’s no way I would have finished it – ever. Half way through I felt like I wasn’t going to finish, and that doing something else would have been more entertaining. I’m glad I didn’t give up.
  • Taking a break from coding. Despite being completely-counter intuitive, taking a break in the afternoon was probably a really good idea. It got my mind off of the problems I was experiencing and made me re-think my original idea. That, and getting the animated bubbles working was a real confidence booster – enough that I wanted to keep going.

What Went Wrong:

  • Terrible Art. Despite having a drawing tablet at my disposal, I’m still apparently a pretty terrible artist.
  • Complete lack of sound and music. I’ve never coded anything with sound or music, even in XNA. I imagine a little bit of both would have gone a long way.
  • Terrible collision detection Despite having linked in to the Farseer physics engine for XNA, I didn’t end up using it. Instead I rolled my own hastily-built collision function. The result is that the end of the tentacle doesn’t perfectly collide with the falling debris like it should. I had some trouble getting everything working just right, so I ended up just slapping it all together and making it look half-decent.
  • Bugs in the framework. There’s nothing quite like coming down to the crunch, only to discover that previously written code doesn’t work as expected. I quickly discovered the that was used to quit all the game screens would throw an exception if the transition off time for a screen was set to 0 seconds. The dirty way around this was to set all the transition off times to 0.01 seconds. This explains a bit of the odd behaviour when quitting the game.

All in all, I had an absolute hoot of a time. It’s been far too long since I have done any game programming, and the community contest was just the thing to whet my appetite again. It’s inspired me to do some more game development in my spare time, and to be even more prepared for the next contest.

You can download Kracken Smack here. It requires the XNA 4.0 runtimes, which can be found here.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s