Jump to content
  • Advertisement
Sign in to follow this  
nsf

Is C still useful in gamedev?

This topic is 4032 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

Just curious. Are there programmers in gamedev who still using only C (without ++)? If yes, then why they do that? How big their games are? Which platform (win32/nix/other) they use? Personally I prefer C instead of C++, but I'm a small hobbyist programmer. By the way, I started programming in C++ and only then switched to C.

Share this post


Link to post
Share on other sites
Advertisement
i Think C++ requires a lot of time to before you actually write anything :) i mean a lot of preplanning for the object thing. But for a C programme that is not a big issue.

Share this post


Link to post
Share on other sites
Quote:
Original post by nsf
Just curious. Are there programmers in gamedev who still using only C (without ++)?


Not likely. The GBA was C only for the most part, not sure about the DS, but i suspect they use C++.

Quote:
If yes, then why they do that?


With a decent C++ compiler there is no need. Might as well use C++.

Quote:
How big their games are?


Not likely to be that sucessful.

Quote:
Personally I prefer C instead of C++, but I'm a small hobbyist programmer.


C doesn't scale well to a large project. Get back into C++.... it is worth your while (or use C# which is nicer than both C and C++ imo).

Share this post


Link to post
Share on other sites
Started in C++ then switched to C???

Read a book on C++ (read it)... Any good book... Then read one on design patterns. If you still want to stick with C that's your choice but the fact is, in my opinion, programming is WAYYYYYYY more fun with objects. When I was in C it came to a point where programming was a chore and no more fun.

Lovens

Share this post


Link to post
Share on other sites
Quote:
Original post by rk_theone
i Think C++ requires a lot of time to before you actually write anything :)


All languages do.

Quote:
i mean a lot of preplanning for the object thing. But for a C programme that is not a big issue.


Rubbish. You can write bad code in either that suffers from lack of planning. The amount of work required to re-factor a C program will be no less that it would for a C++, perl, java, C#, asm {insert favourite language here} program.

Share this post


Link to post
Share on other sites
Quote:
Original post by Lovens
Started in C++ then switched to C???

Read a book on C++ (read it)... Any good book... Then read one on design patterns. If you still want to stick with C that's your choice but the fact is, in my opinion, programming is WAYYYYYYY more fun with objects. When I was in C it came to a point where programming was a chore and no more fun.

Lovens

I read almost all C++ books ;) From classic Stroustrup to Alexandrescu's "Modern C++ Design" and Abrahams/Gurtovoy "C++ template metaprogramming". I wrote things on C++ for 4 years. And now I see the new C++0x standard from Bjarne and others and starting realize that this is the end of C++. Don't want to speak much about OOP. But really, with objects you just have "fun", not programming.

I think the best choice here is to use C for low level programming and other (which? python/lua/perl/C#/D?) language for high level [object oriented] (if really needed) programming.

But I feel myself alone right now ^_^. I know there are such fanatic C coders like me, but not in gamedev.

So, if there is at least one programmer who thinking my way, drop a note, I will be glad to hear it :)
Quote:
Original post by RobTheBloke
C doesn't scale well to a large project. Get back into C++.... it is worth your while (or use C# which is nicer than both C and C++ imo).

Maybe it is programmer's fault? Linux kernel seems very big, GCC also.

Share this post


Link to post
Share on other sites
Quote:
Original post by rk_theone
i Think C++ requires a lot of time to before you actually write anything :) i mean a lot of preplanning for the object thing. But for a C programme that is not a big issue.
You should be doing a lot of pre-planning for any language, especially something with as little room for improvisation and as much fragility as C.

I see this argument all the time, honestly. Sure, you have to have more domain-irrelevant boilerplate with a small OO program, but as the complexity of your code increases you spend a hell of a lot less time working around stupid deficiencies that the computer should be taking care of.

Maybe it's just my Smalltalk and Hypertalk education talking, but I guess if you use C++ all day C must seem like a simple and liberating experience.

Share this post


Link to post
Share on other sites
Quote:
Original post by RobTheBloke
Quote:
How big their games are?


Not likely to be that sucessful.


Huh? How would the choice of a language affect how sucessful a game is?

That comes down to design of a game and luck. None of which are affected by choosing C++ over C.


Also keep in mind, in C++ you can choose the 'amount' of C++ in the code. You can stick to using classes, but avoid inheritance. Or, you can have instances of all of your classes as globals. And, as you see the need to evolve your code, you can adopt more C++.

Share this post


Link to post
Share on other sites
Quote:
Original post by RobTheBloke
Quote:
Original post by cdoty
Huh? How would the choice of a language affect how sucessful a game is?


write me a ps3 game in LISP....
That would be easy. Really easy, in fact.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!