Tuesday, September 14, 2004

Quake II .net

mms://wm.microsoft.com/ms/msnse/0408/23360/Scott_currie/Quake_Demo_56K_110K_300K.wmv

Video is a MS dev showing Quake II running under .NET

This is a pretty old story... I think summer of last year (told Rahul about this when I was in India). The guys who made Quake, ported their C code to C++ and then compiled it under the .NET CLR. They then added new functionality using managed code. The entire process is quite nicely detailed in this whitepaper, incase you're interested.

They were able to take legacy code and just compile it under .NET without making significant changes. OK, they had to first get it to C++. But after that it was just a recompile. The C++.NET compiler takes your native code and generates MSIL. This means that your app is a ".NET friendly" citizen. You can now come in and create new features using C# or VB.NET or whatever, getting all the benefits of managed code and using the .NET framework, and easily integrate it into this legacy app. Understand that the old code is NOT being GC'd. It still needs manual memory management. But it's able to play nice with managed components with little effort.

I still don't understand the exact process of what happens under the hood, but I think it's pretty damn amazing.

No comments: