I have had a small game (Written in C#) which I’ve built up over time (started in vb6/bitblt) which I would like to convert to Silverlight, essentially to give me a good interesting project to learn the platform.
My question is simple, (the game is a tile based game) I need to render somthing. How is this performed in Silverlight, as things stand I have a number of sprite and tile sheets and we Blt each tile to the surface (Picturebox)
Is the concept the same in silverlight, do we need to use a Picturebox as the surface? What are the rendering functions? External Libs? I’m seen the WritableBmp function, Could somone point me in the right direction to get us started?
==========================
Thanks for the replies, some more info about the game.
Its a single player, tile based RPG. I would need to render tiles, and then characters and objects onto the tiles (Or multiple tiles) with that in mind, what would be the optimum way to achieve this? Performance is key, everyone hates flickering, jittery games.
With that said, is anyone aware of any samples that simulate what we have spoken about?
You should use the WriteableBitmap. It was designed just for situations like this.
For an example on how to use it you could look at my simple sprite-based-game-library, SilverTile. Is uses the WriteableBitmap as its rendering surface and performs reasonably well.
If you want to write everything from scratch you should look at the WriteableBitmapExtensions project. It gives you extension methods that simplifies working with the WriteableBitmap.
Edit: Oh, and this reminded me that I need to update the code on Codeplex. Contact me if you want a more recent version of the code along with some samples.