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
7 Comments:
Is there any reason why I am getting this error in compiling. Any mismatch in the interactivity.dll??
Error 2 The base class or interface of 'System.Windows.Interactivity.AttachableCollection' could not be resolved or is invalid c:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Silverlight\v4.0\Libraries\System.Windows.Interactivity.dll Madness
that blows me away
This is awesome ... thanks!
the solution is missing the Madness project...
Seems like from my experience the ref to System.Windows.Interactivity.dll does not pick up in one of the projects (and yet does in the others).
Just delete that ref and re-establish manually. Should be in C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Windows Phone\v7.0\Libraries or similar...
To fix the problem with System.Windows.Interactivity.dll on Vista and Windows7, right click the dll and unlock it. It happen when you import dlls or exe files over the network
any chance you can record a screencast sometime on using Box2D in Silverlight? I find that integration to be pretty awesome, but having a hard time finding much resources on it..
Post a Comment
<< Home