Jump to content
  • Advertisement

Archived

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

buck71

C versus C++

This topic is 6096 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 been working on learning C for a while now and want to start moving towards making games. It seems though that all game development is done in C++. Obviously I would like to make the best game but it seems a shame to not use what Ihave learned of C. Is C++ certainly better for games? If C can do all that C++ can do where do I find out how? Does anyone work primarily with C? etc etc... Any thoughts would be appreciated

Share this post


Link to post
Share on other sites
Advertisement
Quake 3 -> C
Half-Life -> C++.

It''s all down to preference, so try which you like. They are very similar, it all depends whether you want to program procedurally or OO.

End of thread - no more needs to be said.

( Hey, that rhymes! )

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
C++ is an extension of C. If you use C++, you are using parts of the C language. C++ is C and OO (object orientation). I primarily use C in most of my programs, but once in a while will include sections of C++.

Billy

Share this post


Link to post
Share on other sites
So, where can I find good tutorials/books on games programming and C? I have so far found nothing in the shops.

Share this post


Link to post
Share on other sites
All my game programming has been ALL in C (a side-scrolling shoot em up, and a board-game AI that learns how to win at tic-tac-toe, checkers, and connect-four) (except DirectX), so it can be done; however, sometimes I wish I had created classes for encapsulation and done some polymorphism with it, but, oh well.

Nutts

Share this post


Link to post
Share on other sites
quote:
Original post by buck71
So, where can I find good tutorials/books on games programming and C? I have so far found nothing in the shops.


take a look here it has a rather cool sections calleds "books and software" and "articles and resources", i think they will be of great use

if you cant buy books online, get info on the book online and go to your local store (waterstones, whsmith) and ask them to order it.

also, might a suggest to not jump straight into game development, learn at least the basics of the language first, that way you save time and confusion...

Share this post


Link to post
Share on other sites
quote:
Original post by buck71
So, where can I find good tutorials/books on games programming and C? I have so far found nothing in the shops.


heh off the top of my head I can''t think of any non C game programming books. OpenGL game programming is pretty good IMO and Tricks of the Windows Game Programming Gurus is supposed to be good but I''ve never been able to get a copy and i think it would be slightly pointless now.

Share this post


Link to post
Share on other sites
You should also consider the possibility of employment at some future date. I know of no companies that use C any more. ''C'' shops have moved on to C++.

But even if you are not by profession a programmer, you should consider C++. It is extremely powerful once you understand the subtleties.


D.V.

Share this post


Link to post
Share on other sites
I made my first couple of games in straight C with DirectX, and am making another one now in C++ with classes and boy, I wish I had done that from the start, it makes the coding so much simpler and easier to debug.

Share this post


Link to post
Share on other sites
quote:
Original post by DeltaVee
You should also consider the possibility of employment at some future date. I know of no companies that use C any more. ''C'' shops have moved on to C++.


That''s funny, the way I''ve heard it, more companies use C than C++ still. Can you site the reference for where you got that? I don''t remember where I found mine, but I''m not trying to say you''re wrong, just that I''m informed differently . My advise is to just learn to code both, they''re much alike, and then you won''t care which one you use. I write a lot of code in C (modular mostly), but I like C++ too (for OO stuff).

[Resist Windows XP''s Invasive Production Activation Technology!]

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!