Archived

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

C++ Knowledge for Game Programming

This topic is 5174 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 read a few C++ books and tutorials and I''m going to read a game programming book or tutorial soon. My question is what C++ knowledge is needed to program a game and what C++ features are used? I''m reading The C++ Programming Language. I was only going to read Part 3 of it which talks about classes, operator overloading, exceptions, and more stuff needed to create types. Are does things used a lot in game programming or are there others things used more?

Share this post


Link to post
Share on other sites
You can do without the standard template library and the iostreams library. I find the C IO library (fopen/fread/ etc) much easier to deal with for binary file I/O.

The STL is convenient once you know it, but it''s optional for just creating a game using C++.

Share this post


Link to post
Share on other sites
Yup, it''s like a toolset. You could drill holes, affix nails, and put in screws, using only a screwdriver; but it''d be better to have a screwdriver, drill, and hammer available to you. The more of the language you know, the more you can advantage of that to save time and mess.



Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu

Share this post


Link to post
Share on other sites
this is probably gonna sound crap, but i think its much better to have a very sound knowledge of all the features of c/c++ before jumping into writing a game. if you rush into it (like i did ) you''ll end up throwing the book at the monitor, well maybe not that bad, but its a safe bet you''ll get frustrated pretty quickly

good luck and post some screenies of your first game :D

Get busy livin'' or get busy dyin''... - Shawshank Redemption
Altered Vision

Share this post


Link to post
Share on other sites
quote:
Original post by superpig
Yup, it''s like a toolset. You could drill holes, affix nails, and put in screws, using only a screwdriver; but it''d be better to have a screwdriver, drill, and hammer available to you. The more of the language you know, the more you can advantage of that to save time and mess.



Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu


Game programming languages are like tools, like he said. Lets say C++ is a wrench and Python is a hammer. You could hammer a nail with a wrench, but a hammer would be more effective. Consider some scripting languages as well. The STL is a good think to know.

Scott Simontis
e-mail:ageofscott@comcast.net
AIM:ssimontis

Share this post


Link to post
Share on other sites
I already know most of C++, I''m just reading a book to get a deeper understanding of it. I don''t really want to read the whole of The C++ Programming Language, but I''d read the whole thing if it''s necessary to learn enough C++ to program games. I need to know what parts I should really understand and know a lot about.

Share this post


Link to post
Share on other sites
quote:
Original post by Program
I read a few C++ books and tutorials and I'm going to read a game programming book or tutorial soon. My question is what C++ knowledge is needed to program a game and what C++ features are used? I'm reading The C++ Programming Language. I was only going to read Part 3 of it which talks about classes, operator overloading, exceptions, and more stuff needed to create types. Are does things used a lot in game programming or are there others things used more?



Let me put it this way, the more you know about the language the better off you are. No C++ knowledge isn't required to write games. People have used other languages like Qbasic, Java etc. C and C++ are the most common languages for professional game developers. The features one uses varies depending on what they're tring to do and how they've designed the program. Classes, overloading, exceptions, user types are quite common.
If I were you I wouldn't be in such a rush to develope a game.
By rushing through C++ your denying yourself access to some very useful and powerful tools.

[edited by - prh99 on October 11, 2003 10:00:13 PM]

Share this post


Link to post
Share on other sites
I''m not really in a rush. I''ve been programming for almost a year and I already know C and C++ and I haven''t made a single game aside from tic tac toe game I made with text. I just don''t really feel like reading the entire book since I already know what it talks about but just not in depth.

Share this post


Link to post
Share on other sites
well, if you''ve got the basics and your feeling confident - go for it. learn as you go. you never know what feature you may need up the road so asking what to concentrate on is kinda co-dependent on what your doing exactly and how you prefer to solve problems. of course knowing more features is always preferred.

Share this post


Link to post
Share on other sites
Knowing the details of the language is one thing, but knowing how to use the language properly and effectively is another. These two C++ books are worth every penny, they teach you how the language SHOULD be used:

Effective C++
More Effective C++

So if you feel quite confident with the details of the language, then I would highly recommend you to read these two books. After that you should be completely ready to tackle game programming.

Share this post


Link to post
Share on other sites
if you have a confident understanding of C++ then your next bet is to gain a confident understanding of a graphcis API, windows programming, event driven programming, OOP, etc.. all the concepts behind the languages.

One thing you could challenge yourself to is to make a simpel one screen none scrolling game. bust-a-move clone, tetris clone, donkey kong clone, pacman clone, there''s plenty of retro''s to chose from.

Share this post


Link to post
Share on other sites