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

Play Brainz