C versus C++

Started by
20 comments, last by buck71 22 years, 5 months ago
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
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! )
If at first you don't succeed, redefine success.
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
So, where can I find good tutorials/books on games programming and C? I have so far found nothing in the shops.
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

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

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...

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.
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.
D.V.Carpe Diem
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.
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!]

This topic is closed to new replies.

Advertisement