Continuing my theme of concentration and mental training games I decided for my first app developed exclusively for a mobile platform I would do a number pattern matching game. The idea was to start with basic patterns and work towards more complex actions that would use actions only possible on a mobile device. The game begins with simple tap and swipe gestures, but later requires two fingers to do actions simultaneously. Eventually I would hope to create a sort of finger twister where all five fingers would be required to perform an action, and each finger would have to hit the screen in a specific sequence.
As part of a group project for programming, I worked with a team to create a game coded in Actionscript 3. The concept was to create a maze game but eschew the typical setup of creating a random game board with rectangular walls in favor of an organic navigation concept, in our case the human brain. The advantage of using a bitmap image versus a dynamically generated maze was that the game could eventually be adapted so that players could create their own mazes with no knowledge of programming. They would only have to create a maze with a guaranteed way to finish.
Originally, research efforts had focused on either using some type of collision detection involving the maze ball and the walls, either by constantly analyzing the pixels surrounding the ball to detect overlap or creating collision areas dynamically by scanning the background images. Eventually we discovered the bitmapData hitTest method in Actionscript 3 that could take two contrasting images and automatically determine if they were overlapping. After some time researching physics engines and creating our own hit test program, this proved to be a surprisingly mundane solution.
I oversaw content integration, putting together the brain, splash pages, and reset program into one game as well as coding the reset screens. The game clock was an original creation of mine, using a timer loop to generate the elapsed time in the game. The scoring system awards the player a rank based on how fast they can complete the maze. There are options for keyboard or mouse input; different mouse control systems (click, rollover, displacement) were tried and the rollover method was found to be the most reliable and easiest to use in the maze. The keyboard method provides a fallback for those finding difficulty with the mouse.
Coding the game reset proved to be more challenging than expected, with a lot of components that needed to be reverted.
Click below to play Brainz