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."

9 of 59 comments (clear)

  1. Re:Using the term "ported" loosely by kasparov · · Score: 2, Informative

    Quake II, if I am not mistaken, was written in C (not C++). So it looks like they ported the code to C++ and used .NET so that you can run the engine as a managed app. Should make it pretty easy to add new features.

    --
    There's no place I can be, since I found Serenity.
  2. Re:Using the term "ported" loosely by thing12 · · Score: 3, Informative
    You are mistaken. Quake I was written in C with extensions in "QuakeC". Quake II is C++

    Nope, you're mistaken... Quake II is written in C.. which is why it had to be ported to C++ for this project - they use c++ reserved words as variables and what not. And I may be mistaken, but I thought QuakeC was introduced in Quake II.

  3. 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.

  4. 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
  5. Re:Using the term "ported" loosely by irc.goatse.cx+troll · · Score: 2, Informative

    It's in C. I had to check though.

    --
    Pain lasts, kid. Its how you know you're alive. Sometimes I think this growing up thing is just pain management-TheMaxx
  6. 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/

  7. Re:Using the term "ported" loosely by irix · · Score: 3, Informative

    it looks like a complete conversion

    They converted the code to compile in Visual C++ .NET. If you run with managed extensions on, they hook in a class that does the radar using .NET APIs (Windows forms and such). By the way - look at their code for the radar - it is hideous. Everything in the .h file in true "lets make the users of our class import all sorts of useless dependencies" style. Ugh.

    If you diff through the code, you'll notice about 800 lines in their radar implementation and only minor differences elsewhere (don't name variables after C++ reserved words, etc.).

    It is a proof of concept, but a none too impressive one. It is made even less impressive by the MicroSoft cheerleading found all over their description of the port.

    --

    Do you even know anything about perl? -- AC Replying to Tom Christiansen post.
  8. He was right by BoomerSooner · · Score: 3, Informative

    By running as managed code (this is REAL .Net) it was 15% slower. By running non-managed (no CLR) it was full speed (or 15% faster than the managed .Net code).

    VC++.Net is just the same as VC++ 6 with a different IDE as long as you're not using managed code. If you are using managed code you might as well program in VB or C#, it all compiles to the same shit.

  9. Re:Using the term "ported" loosely by drinkypoo · · Score: 2, Informative
    QuakeC was a Quake1 item, since then you've had to program in C, or at least you have to be able to come up with a DLL. I guess you could probably do it all in some other language with a C stub library to appease q2, q3, whatever. Unreal also operates in this fashion.

    I'm sure at some point the overhead of scripting just got to be too much for iD to do scripting internally, so they just put all that functionality into the game itself through a DLL. Of course that meant all those people who learned QuakeC had to learn C... but it was a lot easier to get development tools by then.

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"