Just got back from the UK Silverlight user group meeting to see ‘Silverlight, XNA & Gaming’ by Pete McGann
& Richard Costall
. The presentation centred around Pete & Richards conversion of the classic game Manic Minor
into .net. Pete, self described ‘bedroom gamer’, gave a very interesting talk about how the game was developed using XNA – a platform/toolset that Pete was very passionate about. Richard then discussed the issues of converting the game from XNA into Silverlight. I found this very interesting, partly cause I too grew up with these games (the reason I started software development) and partly ’cause I’m just about to publish my experiences with developing a game in Silverlight. I was especially interested in the pixel-perfect collision detection, which was probably the last thing I worked on when I was seriously into game development. I certainly hope to have further chats with Pete ’cause I think my old bit mask comparison technique may be faster…maybe 😉 I’m sure that I’ll now include some of the points they raised in this talk into my document but I would like to raise one issue now. The game loop used the storyboard technique (although you can now use a simpler event model in RC0
) but chose a value for the interval. IMO, this misses the trick of setting the interval to 0. As Bill Reiss states, ‘If you create a Storyboard with a duration of 0, it will fire its
Completed event one frame after it is begun. So if you begin the
Storyboard again in the Completed event, you’ll have a timer that
executes once per frame’. Now it’s easy for me to say that without really knowing their game but there is a subtle difference between thinking that the storyboard will, "run as fast as possible" to ‘once per frame’. Richard also talked about Pete "slapping his wrists" for not using a time delta in the game loop (more on this in my aforementioned doc) but playing the game on my Mac it too suffers from the same problems I discovered. When you use a delta you effectively store up a number of moves. However, when you do suffer a "glitch" the effect (in this case) is that Minor Willy make sudden random "leaps" which means you end up crashing into the baddies. The game is almost unplayable for me 😦 Perhaps this is the curse of using Silverlight on a Mac??? Is was for a similar reason I removed the delta from Olop. Don’t get me wrong, I think the game is great, but I’d love to get to the bottom of the delta issue.
Overall I enjoyed the presentation and Pete’s enthusiasm for a area of computing that’s dear to me has certainly made me consider dusting off the game programming gloves and possibly even getting hold of XNA too.
Oh Pete (and other retro-gamers) the film you want to watch is King of Kong (a fistful of quarters)