🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

c or c++ for games?

Started by
3 comments, last by cyberg 24 years, 5 months ago
hello, i have read the article on language between c and c++ to learn first. i know these 2 language, but i ask myself which chose for make games, for now i use just straight C with vc++, but there is no need to use straight because vc++ compile in c++. i use c because i heard that it is a little faster than c++, but with the speed of computer today, that little difference is still important?? and professionnal games programmers use c or c++ ??? cyberg
cyberg- cyberg_coder@hotmail.com- http://members.xoom.com/cybergsoft
Advertisement
Its true that C programs can be faster than C++, because of the compiler has to do things with the classes, I don''t feel it is that much of a difference. I find it easier to represent game characters and levels with C++ objects. An OOP approach to a project usually makes development go better.

Domini
I prefer C++ because of the structure and encapsulation. Anyhow, the speed you gain in C is quite small. Code the bottlenecks in pure assembly and you should have a structured OOP-program as well as a blazing fast one.
thanks guys
i think i will go for c++ now, my code will be better structured for a little lost of speed...

cyberg
cyberg- cyberg_coder@hotmail.com- http://members.xoom.com/cybergsoft
Cyborg,

This is a question that I have struggled with myself, but for what I have seen recently, C++ is the way to go. Besides the fact that you can structure your program much more effeciently with C++ than C, many of the reasons behind not using C++ are no longer true (at least not true enough to matter). As you pointed out, most people are using C++ compilers anyway even if they are writing C code.

What''s far more important is the effecient use of the language. Well written C++ code will run circles around badly written C code.

This topic is closed to new replies.

Advertisement