• Advertisement

Archived

This topic is now archived and is closed to further replies.

c or c++ for games?

This topic is 6573 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
thanks guys
i think i will go for c++ now, my code will be better structured for a little lost of speed...

cyberg

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement