Slashdot Mirror


.NET Version of Quake II

MSwanson writes "It seems that Vertigo Software has ported the Quake II source code to Microsoft's .NET platform. Not only did they add a heads-up display in the .NET managed version, but they also say that the managed version initially ran faster than the native version. After changing some optimization settings, the native version now runs 15% faster than managed .NET code. Still pretty impressive. Download the ported version along with source code at the Vertigo site."

6 of 59 comments (clear)

  1. Using the term "ported" loosely by Dr.+Bent · · Score: 4, Interesting

    So they're still using some native C++ code? Big deal. Sounds like they just put a .NET wrapper around the QuakeII Engine, and they're still using native code to do all the heavy lifting. So you're still tied to Windows, and it runs 15% slower....fantastic.

    Now, when they have a version written purely in managed code than can run on any .NET implementation (and runs only 15% slower), then I'll be impressed.

    1. Re:Using the term "ported" loosely by thing12 · · Score: 4, Informative
      Sounds like they just put a .NET wrapper around the QuakeII Engine, and they're still using native code to do all the heavy lifting.

      Not quite -- if you download it and run the code through a .net disassembler you'll see that it can be converted to msil or higher up to C#. I haven't done a detailed analysis of it, but on the surface it looks like a complete conversion. Of course that doesn't count calls to COM objects and any 3rd party DLL's that are called via platform invoke's. But it looks like the "heavy lifting" is being done inside the confines of the .NET Framework.

    2. Re:Using the term "ported" loosely by z01d · · Score: 5, Informative

      Quake II, if I am not mistaken, was written in C (not C++).

      that's right. and although we don't have quake3 engine source code, but it's safe to say that all id games so far are using C (or QuakeC for mod making of Q1). but not any more, here is a quote from JC about D3:

      I did most of the early development work with a gutted version of Quake 3, which let me write a brand new renderer without having to rewrite file access code, console code, and all the other subsystems that make up a game. After the renderer was functional and the other programmers came off of TA and Wolf, the rest of the codebase got rewritten. Especially after our move to C++, there is very little code remaining from the Q3 codebase at this point

      http://www.gamespy.com/e32002/pc/carmack/

  2. What is the port? by molo · · Score: 4, Interesting

    Quake II .NET is a version of the popular Quake II game, ported to native and managed C++ using Microsoft® Visual Studio® .NET(TM) 2003

    Can someone fill me in here? What is the big deal? Id has always used the MS compilers for that platform. So they just updated it to work with the latest release of the compiler. Wow, fancy shit.

    -molo

    --
    Using your sig line to advertise for friends is lame.
    1. Re:What is the port? by erasmus_ · · Score: 5, Informative

      The big deal is that this new version is now using managed code instead of just native C++. This company did it to illustrate how this can be done, even for large C++ projects. Managed code is run by the Common Language Runtime, allowing for a ton of useful features, which can now be used by Quake 2, or another ported project. A good overview can be found here, but here are a few from that page to get you started:

      The common language runtime manages memory, thread execution, code execution, code safety verification, compilation, and other system services. These features are intrinsic to the managed code that runs on the common language runtime.

      The runtime also enforces code robustness by implementing a strict type-and-code-verification infrastructure called the common type system (CTS). The CTS ensures that all managed code is self-describing. The various Microsoft and third-party language compilers generate managed code that conforms to the CTS. This means that managed code can consume other managed types and instances, while strictly enforcing type fidelity and type safety. ...

      In addition, the managed environment of the runtime eliminates many common software issues. For example, the runtime automatically handles object layout and manages references to objects, releasing them when they are no longer being used. This automatic memory management resolves the two most common application errors, memory leaks and invalid memory references.


      That last one means your program no longer crashes or takes over all memory resources because of bad resource management.

      --
      Please subscribe to see the more insightful version of th
    2. Re:What is the port? by OeLeWaPpErKe · · Score: 4, Insightful

      Quake is a C project. C, not C++, as many have said. This invalidates all of the points you make. Now try again.

      A C framebuffer (that means 2D, and yes quake II is an app that doesn't use any 3D api, it's all in the engine itself the magic happens) app can be ported to everything with minimal effort ( download a few demos and port them to QT, Allegro, SDL, and DirectX), it won't take you very long.

      Also, as the fill rate is the limiting factor, there will not be a very big performance difference in any of the versions.