Porting XNA starter kit “Platformer” to Silverlight (SilverSprite)

I read this post by Bill Reiss the other day and found out about this marketplace thing that Xbox have. (I don’t have an Xbox myself so didn’t knew anything about the community actually. I have a PS3). After reading this, I got a little interested in XNA and thereby SilverSprite, as I can see potential in this new “Xbox Live Independent Games” thing. I haven’t done any XNA or SilverSprite before, only knew very little about both.
So, I decided to take a look at it as it might be interesting to do my current game in XNA and Silverlight. So I started to do a little research.

First I started by follow be beginning of this guide and eventually got Xna game studio 3.1 installed. Then I downloaded the latest changeset for SilverSprite (which supported silverlight 3), so I had the source for that on my pc.
I created an default xna windows project 3.1, so I had something to try things on. The code that comes with this default project were pretty easy to understand and I quickly made a small “game” where a sprite were sliding around the screen and pressing the space button changed the background color. Pretty simple and easy. I got that working in Silverlight using SilverSprite pretty fast, so I thought I needed something a little more complex.

I saw that Xna Game Studio 3.1 comes with a starter kit “Platformer”, so I decided to give that a try. After about 4 hours I had a playable version of “Platformer” running in Silverlight and Windows with the exact same code base – wow! At first 4 hours might sound like much to you, but I needed to change stuff in the Platformer game code and in the SilverSprite core to make this work and if you keep in mind that I haven’t worked with either Xna or SilverSprite before, I think it pretty fast :)


You can try out the game here (Warning: It’s the same assets as in the XNA version, so the game is about 9 MB) : http://silverlight.laumania.net/platformer/

You can get the entire source from here: http://silverlight.laumania.net/platformer/platformer1.zip

Keep in mind that to be able to build the source, you need Xna Game Studio 3.1 and Silverlight 3 Tools installed.

To see all the things I have changed/implemented search for “laumania” in the entire solution. I have made minor comments. The SilverSprite version in this source, is a modified one as stated. I have submitted the changes as patches to the SilverSprite, so they will be in the original source too soon I guess.

My experience of using Xna and SilverSprite were actually really good and I decided to give my current project a try in Xna and SilverSprite :)

– Enjoy!