Jump to content
  • Advertisement

Archived

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

Ratsrik

Does anyone use C?

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

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!

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Nope, it''s absolutely possible, not even hard, to code for D3D in pure C. I use C++ mostly though.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yeah, sorry, I was refering to "if you plan to use DirectX, you won''t get a choice"

Share this post


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

Share this post


Link to post
Share on other sites

  • 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!