Labyrinth Sample for Windows Phone
When I finally got my hands on the Windows Phone developer tools the first thing I wanted to do was to see how well Silverlight on the phone would work for making 2D games, so I decided to make a Labyrinth style game.
The setup is fairly straightforward- I’m using the same Box2D physics engine & Silverlight adapters that are included in the behaviors library I sent out in November. Basically the physics engine is running on the root of each level and the accelerometer from the Windows Phone device is hooked up to control the gravity of the physics engine. When the game is running in the emulator rather than a real device I simulate an accelerometer by dragging the mouse.
The basic application took about half a day to get running and another full day of playing around creating random levels (I tried to make it somewhat non-traditional). After that it was just polish and lots of play-testing (of course!).
The game uses the standard Windows Phone styling and navigation model to navigate between levels. Isolated storage is used to store how long it took to complete a level.
Standard Labyrinth-style level- everything is vector graphics & controls except for the wood textures. Uses the hardware accelerated drop-shadow effect for depth on the walls and the ball.
I was having a real good time playing around with alternate level ideas- this one is probably my favorite. Basically when the ball hits a flipper, the flipper activates and knocks the ball away. It’s a pretty tough level :)
This one is a bunch of magnets that push the ball away from them. It’s a pretty fun level to play as well.
Source code: Madness.zip
