Posts

Showing posts from December, 2010

Game performance benchmark BunnyMark ported to HTML5!

Image
BunnyMark is the benchmark that's taking the world by storm! Just to prove that javascript is easy and a wittle baby language I have ported BunnyMark to HTML5 . Results confirm that HTML5 really is one better than HTML4. Lightning fast with 3000 bunnies in Chrome, Firefox4, horrible in Firefox 3, non existant in IE678. Click here to view , source is on "view source". Other browser users (IE9, Safari, Opera) please report performance in the comments. Don't miss the Windows Phone 7 and Flash versions, and BunnyLandMark for Flash, which I haven't got round to porting yet.

Windows Phone 7 for Flash Developers, Part 2 - BunnyMark benchmark in XNA

Image
To get an idea of what’s possible in terms of 2D games on Windows Phone 7, I have ported my BunnyMark benchmark from AS3/Flash to C#/XNA. The results were very decent for a small device. I could render 3500 bunnies without any slowdown, which is equivalent to what I could do with Bitmaps in Flash on my dual core PC laptop, and about 10 times as many bunnies as Flash on Android could handle. The reason for this great performance, of course is that XNA is hardware accelerated while Flash is not... until next year at least. Here is the source code - watch the video below to see it in action (shot on non-HD camera, so not great quality I'm afraid). XNA splits game updates (equivalent to ENTER_FRAME event in Flash) into 2 separate functions which you override. There is “Update” (confusingly, functions in C# start with capital letters) where you put all the update logic for your game, and there is “Draw”, where you put all the rendering logic. Like copyPixels blitting in AS3, nothi