Adventures in Unity
Constructing our next internal video game (Whack Attack) in the Unity software system has been a joyful experience and a return to my roots as a video game programmer. Instead of dealing with tables and lists for an enterprise web application, I find myself programming mole AI and hit reactions. As an internal project, the few hours a week I get to spend making cartoon mammals run around my phone are a welcome diversion, and makes my return to client work that much more satisfying.
Our first thought with this project was to breath new life into the moles by making them run around on screen in addition to popping and dropping out of view. In doing so, I’ve had the challenge of programming a rudimentary AI that is based on a series of interchangeable instructions. Basically, each mole archetype has a ‘list’ of expected actions to perform in order. This list can be edited directly in the Unity editor, hopefully to diversify mole behavior in later levels. The AI progression can be suspended in the case of a touch-hit reaction, and can be reset or reordered at run-time (in the case of mutating moles, or game events that are intended to cause different behavior).
Making such a basic game model challenging on a touch based mobile device has proven to be an interesting challenge itself. Multitouch comes standard on most touch-based phones now, and people are used to whacking buttons, messages and all sorts of other things with regularity. As such, we’ve noticed that it’s not very hard to whack every mole on the screen. A solution we are looking at now is to incorporate a more traditional pop-up and pop-down mechanic seen in whack-a-mole games, utilizing extensive periods of invulnerability that force players to remember where moles pop so they can strike in those few precious moments.
Nevertheless, we still strive to include unconventional and novel techniques into our game. Boss moles are gargantuan and take more whacks to take down. We have flowers which are targets for the moles, giving an onscreen objective for the AI to defeat the player. We are experimenting with touch based gestures for different attacks, and using an innovative method for animating the moles. Stay tuned for more updates on this exciting new game from Grio!