Alice Game
The most impressive aspect of this game is the way in which Alice’s movements are restricted by the sides of the hole. This became problematic, due to the curvy nature of sides of the rabbit hole. MovieClip to MovieClip hit testing definitely was not going to work in this case. A single point hit test to shape fill of the rabbit hole also would not have created a realistic restriction of movement (Alice body would move beyond the boundaries of the hole before the hit test would trigger). I came up with the idea of setting up variables that track six points surrounding Alice. This way, I could set up a loop in the frame handler that checks for a point-shape collision between the rabbit hole and Alice’s six points. If the collision is true, Alice’s bounces off of the wall, and she loses one heart off of her life.
Another important aspect of this game is Alice’s movements. Acceleration scripts are used to make Alice ease into here left and right movements. An acceleration parameter is defined (accel), and this parameter is added to Alice’s x-movement. After a certain limit off acceleration is attained, the acceleration is stopped, and Alice begins to move at a constant rate.
Bouncing off of the walls became problematic when Alice would hit a rabbit hole protrusion with her feet. She needed a way to bounce up slightly, thus avoiding the obstacle. At the beginning of each level, she appears to fall from the top of the screen as the scroll of the rabbit hole begins. This script, placed on an event handler, increases Alice’s y-position until she reaches a certain pre-determined point. If Alice’s feet (or, specifically, the two variables tracking the points near her feat), collide with the rabbit whole, she is bounced upward. At this point, the event handler that draws Alice to her y-position equilibrium kicks in, bringing her back to that pre-determined point.
Areas for improvement
At this point, there are a few things that need to be improved in the game. First, there needs to be more levels of play. Originally, it was proposed that increasing the speed of the game would be part of advanced levels. Yet, at this time, the scrolling cannot move much faster than it already does. Some optimization of the code is definitely in order (yes, the kludge factor set in as the deadline approached). For instance at this point, the entire maze is drawn at the beginning of the game. This means that the entire maze must be re-drawn for every frame of game play. A way to add and delete sections of the maze dynamically needs to be implemented, thus reducing the load on the processor. Also, they maze could be arranged randomly, making the game both more unpredictable and fun. Finally, an animation with Alice landing on the leaves and walking to the door to try the keys would cause the game-play to make more sense.