3D game programming in C++ vs. C

This is a discussion on 3D game programming in C++ vs. C within the Game Programming forums, part of the General Programming Boards category; Hello everyone; As I am new to the C++ stream I wanted to ask the you fellow programmers if C++ ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    10

    Talking 3D game programming in C++ vs. C

    Hello everyone;

    As I am new to the C++ stream I wanted to ask the you fellow programmers if C++ (or VC++) is better than C for programming large 3D games? I am a veteren in C but green in C++. And if you have time to mention why one or the other is better even if briefly, I'd appreciate it.

    Thanks.
    "If at first you do succeed try not to look astonished!" -- anon

  2. #2
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    Posts
    428
    well, its more what you prefer...cause since most gfx API's are written nativly in C, theylll run fine in either, so if you are gonna be using like inheritance and other OOP techniques, then C++, but or else C, since your already good at it. cheers

  3. #3
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    C++ 's OOP features are a big help at debugging time but you will probably pay for it in a slight loss of performance over straight C.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  4. #4
    Fingerstyle Guitarist taylorguitarman's Avatar
    Join Date
    Aug 2001
    Posts
    564
    I think a mix of both works best.
    There are some things that just make more sense to use classes with but others where it's more of a pain.
    I think it comes down to personal preference.

  5. #5
    Registered User
    Join Date
    Aug 2001
    Posts
    411
    Mostly the step from C to C++ is personal preferance, i find that i can make things more organized if i use classes.

  6. #6
    Former Member
    Join Date
    Oct 2001
    Posts
    955
    I would recommend C++ because you have classes, inheritance, exception handling, template classes and all that, but if you´re good at C and want to make a game right now, go for it...


    Good luck

    Oskilian

  7. #7
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    A large part of C++ involves using C. Apparently it is possible to build these games exclusively in C and they are faster, etc, however the code is liikely much more obfuscated. OOP is a better design because it allows you to think in terms of objects. When you can group data and functions that act on an object together and also derive other objects from a base class than the planning becomes much easier to visualize.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need book to program game into multiplayer...
    By edomingox in forum Game Programming
    Replies: 3
    Last Post: 10-02-2008, 09:26 AM
  2. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 02:46 PM
  3. OpenGL - 2d text in 3d game
    By mikeb1986 in forum C++ Programming
    Replies: 1
    Last Post: 03-22-2006, 12:24 PM
  4. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 12:32 PM
  5. 3D Game
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-10-2002, 04:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21