“Barnacles” postmortem


Gameplay video is here.

Here’s my game for the 48-hour competition.  The main page is here if you want to play.  You are a predatory fish and must eat the “barnacles” to survive.  Each round, the barnacles repopulate using a genetic algorithm.  Because of this, they will gradually adapt and evolve to your playing style, eventually getting so strong that you lose.

Good

  • I think the gameplay turned out fun. I was afraid the genetic algorithm would just be a gimmick, but actually you can get a much higher score if you’re aware of how adaptation works. If you selectively eat the most powerful barnacles so that they don’t reproduce, and avoid the easy pickings, you can do much better.
  • Even though I started a day late, I still managed to make it as polished as I wanted it. I even had time at the end to playtest and take my time making music. The small scope really helped here. The algorithm behind the game was the only really “big” element I had planned, and even then I axed a planned “stab” ability that would have been very similar functionally to the shoot ability.
  • Surprisingly, the enemies seem to adapt pretty well. This may be because I tried to make the potential for different “behaviors” as complex and analogue as possible. Barnacles can “like” or “hate” the X and/or Y positions of the player, seaweed, and rock, as well as the RGB colors of other barnacles. I think this may have even enabled some really simple “symbiotic” relationships.
    It may have worked better with a larger population, and with slower mutation, but that would be a long time to ask the player to play an arcade-styled game.
  • Multimedia Fusion 2 was, surprisingly, a good choice. It was a gamble whether or not the simple event system would break when asked to handle the complexity of a genetic algorithm, but I made an effort to make my code very clean, and it just works. I’ve been using Clickteam software for 15 years and am still amazed at all it can do. Thumbs up.

Bad

  • The name. I’m not very good at coming up with names when I don’t have enough time to think about it. “Barnacles” just doesn’t have a nice ring to it at all. In retrospect, I think “Diatoms” would be a better name and I’ll probably rename it that before I put it on my website.
  • Performance issues. I had planned all along to make the game work in Flash, but when I finally exported at the end, it ran much too slow. I hear Flash doesn’t handle MMF2 fastloops well so maybe that was the problem. Even in standalone form though, it does slow a little bit when there are a lot of barnacles with complex behaviors clustered close enough to see eachother.
    Coding the game in C++ would have made it run smoother, but the huge amount of time saved from using MMF2 made it worth it overall.
  • Bugs. To be expected I suppose. The main one is those pitch-black barnacles that appear rarely, and don’t propagate their color as one would expect. I just didn’t have enough time to grind through the code and figure out what was causing this.
  • Mistakes. I just realized since I forgot to initialize the values, the first batch of barnacles start their life “hating” everything. Probably would work better if they started neutral.