Thread: C for the pros

  1. #1
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688

    C for the pros

    Hi found some game code on the web created by the world famous 'id software' and it is for the game quake. It is large file containing about 60 souce files.

    You can check it out by visiting

    www.planetsourcecode.com

    and clicking on C++ then games, type in quake in the find box.

    I think id software must of released this as open souce code. Anyway, my point is I did not think that Quake would of been coded in pure C. I know C++ is well known for games programming, but I thought C was used to create the modules and stuff.

    I am not sure when Qauake was originally released, but perhaps they thought of using C over C++ for portablility. I guess now all game programmers ( proffesionals ones ) use C++ over C, but that is not an absolute, just my view on it. Others may differ. C++ is object orientated, where as C is more structured.
    Double Helix STL

  2. #2
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Quake was developed on NEXTSTEP, right? Yeah.
    Quake 4 / Doom 3 was the first of their games (that they've GPL'd / released SDK's for) that was written in C++. (As far as I know)

    q1 - q3 = C. Same for DOOM and Wolf3D, and the Commander Keen series I expect.

    Radiant (the editor line for the Quake games) was written using MFC (so C++).

    I'm writing my engine in C++ and all the tools in C, purely because I can. I felt like not having the STL at my disposal and forcing myself to implement data structures in C, just for the experience.

    However, I'm not sure how much of the editor (that I'm yet to design) this could apply to since it'll need to interface with the engine (most likely) and that'll be written in C++. Meh.

    EDIT:

    I just re-read my reply and realised how quickly I managed to float off-topic. Sorry about that
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I use C++ for nearly all tools and game projects. I could not imagine going back to non-object oriented code for one minute.

    The only downfall I have with the STL is the fact that MS has still yet to release a version of it that is portable across module boundaries. Because of this any object that uses an STL container cannot be placed into a DLL.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 08-18-2008, 05:31 PM
  2. Pros and Cons of blocking versus non-blocking sockets?
    By abachler in forum Networking/Device Communication
    Replies: 4
    Last Post: 05-08-2008, 06:52 AM
  3. what do the pro's do??
    By swgh in forum Game Programming
    Replies: 7
    Last Post: 06-23-2005, 12:14 PM
  4. Game of Life pros - help me
    By bnmwad in forum C Programming
    Replies: 1
    Last Post: 04-06-2005, 02:35 AM
  5. What Do The Pro's Use To Build Video Games?
    By DeanDemon in forum A Brief History of Cprogramming.com
    Replies: 25
    Last Post: 12-12-2002, 11:08 PM