Does anyone use C?

Started by
34 comments, last by Ratsrik 21 years, 2 months ago
I have just recently learned C programming, and upon visiting this site, i have not been able to find anyone that is developing a game Using C! If anyone is out there and uses C please post here, it would be even better if you were interested in making a game, becase so was i! i have a fairly good drasp on the language and i think a project would help tone my skills!
Advertisement
C is a good programming language, but if you want to do games and stuff it might be a good idea to learn C++. You''ll need the classes and the object oriented stuff in C++ to make it all a little easier. A lot of people (I think) use a combination of C and C++ so they can use classes and such.
Until Then, I Remain,Brandon
quote:Original post by danger_boy_13

A lot of people (I think) use a combination of C and C++ so they can use classes and such.


If you use classes and other C++ features, then you really aren''t using C at all but the C-like backwards compatibility features of C++.

There is nothing wrong with using plain vanilla C to write a game - take a look at the Freespace 2 code which had been released. As far as I remember (taking in to account that my memory isn''t that great) that was written in pure C, as was Quake.

Jx

I''m using C for a cel-shading renderer. Note: if you plan to use DirectX, you won''t get a choice.

C - God''s programming language. (Redbook)
Yeah I think Jx is right. id seems to prefer C, probably because there''s a speed advantage. So there is at least one big developer out there who hasn''t hopped on the (not quite) O-O bandwagon, with good results.
quote:Original post by easlern
Yeah I think Jx is right. id seems to prefer C, probably because there''s a speed advantage. So there is at least one big developer out there who hasn''t hopped on the (not quite) O-O bandwagon, with good results.


id uses what Carmack calls "C+". A mix between C and C++. Even JC knows that you can''t ignore some of the benefits of using some of the C++ features.

You can also consider the fact that anyone that has gotten a look at any of id''s source code considers it hard to follow, and generally bad. It''s been labeled "carmack code" and the term isn''t used to praise someone.

As for Object Oriented, I''ve seen games written in Object Oriented C (not C++). And it''s quite dirty but it gets the job done. So you don''t need to use C++ to do OO programming but it does make things alot easier.
Why do you say you can''t use C with DirectX? I don''t have much experience in DirectX, but I do in COM and you can use COM from C. From what I''ve seen the D3DX library in DX8 supports C++ by adding operators and stuff by subclassing C structs provided by DX - but all the supporting maths functions etc are plain C and you can use the original C structs. Am I missing something?
Nope, it''s absolutely possible, not even hard, to code for D3D in pure C. I use C++ mostly though.
Yeah, sorry, I was refering to "if you plan to use DirectX, you won''t get a choice"
quote:Original post by easlern
id seems to prefer C, probably because there''s a speed advantage.


There is no discernable speed advantage between C and C++. Anyone who says otherwise is either a zealot or ignorant (probably both).

-Mike

This topic is closed to new replies.

Advertisement