Silverlight 2d Rendering Options
I'm working on a game that I'm developing in Silverlight, and I'm trying to decide on the best implementation, performance wise. I don't expect the game to be very intensive, but doing it the right way always beats doing it the easy way. The two options I've considered are either using WriteableBitmap and manually draw everything and the other option is using Silversprite. I did some searching, but I couldn't find any performance comparisons, so which option is faster? Also, Silversprite uses XNA, does this mean it开发者_StackOverflow中文版 wont work on Mac?
SilverSprite is an implementation of the XNA API on top of Silverlight. So it's not actually the "real" XNA. So your platforms are limited to what Silverlight will run on - so, yes, it will run on Mac.
Performance-wise, WriteableBitmap is unusably slow for anything non-trivial.
Using Silverlight elements to render your scene can be very fast - even hardware accelerated - but it requires a lot of messing about and knowledge of how Silverlight works under-the-hood to get a good result.
My experience with SilverSprite is that it is slow and buggy, and it's also missing quite a few important XNA features.
As a bit of a coincidence - and a shameless plug - I have written an alternate implementation of XNA that runs on Silverlight with hardware acceleration (example) - so it's very fast. And I'm just a few days away from making an announcement about it. Feel free to email me for more details.
精彩评论