Monday, May 09, 2005

Game Loop and DXUT Framework

There's an interesting post over on Tom Miller's blog about the final words on game loop in C#. You may not know but the way shown in my tutorials uses the (once) standard method that causes some superflous objects to be created and destroyed each frame. Obviously we don't want that. But we don't want something really overly complicated either. Any there have been various different ways of doing a fast C# loop but generally they're not very pretty. This one isn't exactly elegance in a dress but it's worth a look, and supposedly will be the last word on the subject too!

Speaking of which that current "framework" thats suppose to help people get started is crazy! It seems far too complicated with far too much voodoo going on! A new programmer wants to be in his own little kingdom where he knows what every line does. The docs are rather sparse as well. It's not a framework I'll be using in the near future.

So last week in Japan was goldenweek, a week of bank holidays. I got nothing done :D

I've implemented the Game Loop mentioned in the blog. I couldn't find any "WindowMessage" data type anywhere in C# so with a little bit of googling I changed it to an Int32 and this doesn't seemed to have caused any problems. Also remember to add using System.Runtime.InteropServices;. I also didn't create a native methods class. That's about it though really, everything else is cool.
Post a Comment