Sign in to follow this  
Dalphin

Which basics do you need to know

Recommended Posts

Hello Community,

 

I'm already a few months bizzy learning c++ to start game programming in the future.

I only wanted to know for sometime, which c++ basics are required to start making games.

I couldn't find an answer to that after some research, so i decided to just ask it here.

 

So for short my question is: Which basics of c++ programming do i need to know to start game programming?

(I don't know, if i ask to much with this, but i would really love it, if someone could setup a list of the things?)

 

Thanks everyone.

Edited by Dalphin

Share this post


Link to post
Share on other sites

As "Eck" said, this is a very vague question.  The vague answer is that you need all of them (hence why they are the basics).  Not only do you need know them, you also need to be comfortable using them.

 

With this being said, game programming in C++ involves heavy use of classes, functions, control statements, data types, and especially pointers.

 

EDIT: You "can" get by using certain methods, such as only using "if" and "else," and not using templates, however anything classified as a "basic" is generally used extensively.

Edited by ByteTroll

Share this post


Link to post
Share on other sites

Thanks everyone,

 

When i read my post back, while thinking of what you guys said, i understand that it is vague for other people,

so sorry for that.

Basically what i mean't is: Which basic aspects of the c++ language, such as functions, statements, classes, etc.

are required to start making small games (like pong at the beginning and then all the way up to something 3D) 

and which aren't required, but will be very handy to know.

For example: Maybe you can say that knowing about and how to use classes is required, but something like polyformism isn't (I saw this in another topic)

 

I hope this might be less vague and possible to answer,

Dalphin

Share this post


Link to post
Share on other sites

I think you're looking at it the wrong way. There are no "basic things that I should know to make a game", you can make a Pong clone with or without classes, without or without some control loops (I can't remember the last time I used the do-while loop, you can use while loops instead of for loops, if/else instead of switches, etc), with functions or with all the code inside the main block, with ascii graphics in the console or with real graphics in a window, etc, etc, etc. A coworker onces showed me a bomberman clone he did with ascii graphics inside the console.

 

You will learn what you need to make a game making games. Start simple, do the things the way you can using the things that you know, and learn from the experience, you won't make a polished game on your first (or second, or third, or ...) attempt so it makes no sense to search for the basic things, no "basics" list will be enough.

 

If you know about classes then you're trying to do OOP, so you should learn polymorfism and inheritance at some point. When you're ready to learn about it start a new project (a game or other kind of app) and learn them while writing the code.

Share this post


Link to post
Share on other sites

Thanks everyone,

 

When i read my post back, while thinking of what you guys said, i understand that it is vague for other people,

so sorry for that.

Basically what i mean't is: Which basic aspects of the c++ language, such as functions, statements, classes, etc.

are required to start making small games (like pong at the beginning and then all the way up to something 3D) 

and which aren't required, but will be very handy to know.

For example: Maybe you can say that knowing about and how to use classes is required, but something like polyformism isn't (I saw this in another topic)

 

I hope this might be less vague and possible to answer,

Dalphin

C++ isn't the only language (or even best language) you can make games in. Everything you learn about programming is another tool you get to put in your tool belt which you can later use to better solve the programming problems you'll face during any programming project (doesn't have to be games!).

 

Think of it like building a house. You are a carpenter. At the most basic level, you can stack boards on top of each other (like a log cabin) to build a very crude, rudimentary house. If you learn how to use a hammer and nails, you can build a slightly less crude house. Maybe, if you learn how to do "framing", you can build together a house which is much more structurally sound and uses less wood. But, all you have is a hammer and nails, so you're a bit limited by the tools you can use. You can build a better house if you can learn how to use a saw to cut wood into smaller pieces. This would let you build something that actually looks something like a shack, though you still won't be able to build anything much more complicated. Perhaps, you eventually learn how to pour concrete and discover how to build a foundation for your house building projects. This makes your houses more stable. Maybe you also learn something about load bearing walls and this lets you build a house with multiple stories. You find that it takes a lot of trial and error to build the houses, so rather than starting to slap some wood together, you decide to spend a bit of time drawing up blueprints for what you're going to build. After all, it's a lot more efficient to make your errors in your blueprints and correct them than to tear down a bit of construction. The more skills, techniques, and tools you have at your disposal, the better and faster you can build something. 

 

The same principles apply to programming. You are just barely learning how to use a hammer and nails for making games. At best, you can build a very crude game like pong, but you're telling us that you don't want to learn how to use the tools and techniques of the trade. By avoiding learning how to use tools/techniques which will greatly help you, you are severely limiting your capabilities. You're essentially saying, "I don't want to learn how to use a saw! Instead, when I need to cut a board in half, I will use my teeth and chew it in half by biting out teeny slivers of wood." How silly, right? Learning the fundamentals of control structures, loops, functions and variables is the very foundation of programming. Learning how to assemble these core primitives into classes is 100% essential to building any sort of game with any complexity. Polymorphism is a great and valuable tool to have at your disposal, even if you're not going to use it all the time. It's there if you need it! Never avoid learning something new because its hard or new.

 

The other great big tool you'll be using every day during the programming of games is mathematics. It too is a super duper valuable and useful tool. Getting better at math is getting better at making games. Don't limit yourself and your capabilities by trying to get by without learning how to use a valuable tool.

 

Share this post


Link to post
Share on other sites

You're essentially saying, "I don't want to learn how to use a saw! Instead, when I need to cut a board in half, I will use my teeth and chew it in half by biting out teeny slivers of wood."


QFE! Learn what everything in the language can be used for, even if you don't feel comfortable using it just yet. As you write code, you will start thinking "this is kind of tedious, surely there is a better way", and there almost always is - in the parts of the language you haven't used yet.

(Slightly off topic: The ultimate form of chewing boards in half with your teeth: http://en.wikipedia.org/wiki/One_instruction_set_computer )

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this