• Forum
  • Lounge
  • Important C++ for future game programmer

 
Important C++ for future game programmer

Pages: 123
Hello, I have been learning C++ self-taught for a while now, but I am to the point where I am not sure what is the best thing to learn next. I wanted to know, from anyone in the game programming field, what are the most important C++ fundamentals to know? This may not be a great question, but I'm not sure how else to ask it. Also, how difficult is it to get a position as a game programmer, and what are "extras" that many companies would be more likely to select an applicant for? I will of course try to get some programming related degree in college (but I am in high school currently). Thanks for any input!
Last edited on
I'm still a student as well as you. This time, all I can say is....

1.) Meeeeeeeaaaaaath
All I really use is a graphics+input library, C++, 1 percent of the STL, and simple addition, multiplication, and division. Nothing else really. Never really had to mess with stuff like mathematical vectors or anything. (Thank god because I haven't learned about those in school yet).

So really all you need to program a 2d game is game logic and simple math. 3d shouldn't be that much harder.

Reading this over before I post I realized you need to know geometry, but it's kind of flipped, as the graph starts in the top left corner of the screen. Don't forget about trig if you're going 3d.

Well I can't help you with the rest because I'm not old enough to legally get a job.
Last edited on by Fredbill30
closed account (3qX21hU5)
So really all you need to program a 2d game is game logic and simple math. 3d shouldn't be that much harder.


Um... Have you programmed a 3D game before? Not trying to be rude but I am genuinely curious. Could you send me some samples of your source code for your games you made?

Because you need some pretty advanced math for 2D games and even more so for 3D games.

Never really had to mess with stuff like mathematical vectors or anything.


How do you keep track of everything in your game then if you don't use Vectors Math? Simple (x, y) points on a cartesian coordinate plane (In this case your game window) are vector math. So when you load a sprite to the screen at (x, y) position and move it somewhere you are using vector math. When your character moves around screen you are using vector math.


Math is very very important in game programming and you do need more then basic arithmetic skills to succeed. You should know Arithmetic, Algebra, Trig, Vector Math, Geometry, Calculus(Only some things from here), Probability, Statistics, and I could go on but wont.

Game programming is probably the most math intensive programming out there.
Last edited on
So really all you need to program a 2d game is game logic and simple math. 3d shouldn't be that much harder.


? For 3D graphics you would need exceptional skills in subtopics such as matrices, dot product, cross product and many other scalar/vector manipulations/calculations for lighting effects, shadows and even plain 3d vertex shading.

If you wish for physics even in a 2d game, kinematics, momentum and impulses, newtons laws...I could go on.
Last edited on
Zereo wrote:
Simple (x, y) points on a cartesian coordinate plane (In this case your game window) are vector math.
I'm admittedly not the greatest at math, but how is that vector math? The API may be using vectors internally, but I wouldn't say he is using them.
Last edited on
Simple (x, y) points on a cartesian coordinate plane (In this case your game window) are vector math.
I'm admittedly not the greatest at math, but how is that vector math? The API may be using vectors internally, but I wouldn't say he is using them.


It depends on the implementation of the API, though if you were to move a sprite, you would be using simple vector translation:

 
entity.translate(4,5); // Translate magnitude 5, direction 4. 
Last edited on
closed account (3qX21hU5)
It depends on the implementation of the API, though if you were to move a sprite, you would be using simple vector translation.


You guys are correct, sorry wasn't paying attention when I was typing.
Last edited on
My advice when aspiring to be any specific type of profession is to look at job listings.

http://www.valvesoftware.com/jobs/job_postings.html
Last edited on
Uh no. I haven't made a 3d game or anything.

Never knew those where vectors because my math teacher never said anything and just called them translations and rotations.

I can send you my source code but give me a day or two because I'm grounded from my lappy and I have to make the code more readable.
Also, how difficult is it to get a position as a game programmer, and what are "extras" that many companies would be more likely to select an applicant for?
Not personally employed as a game programmer, but I do go to college for game programming and a lot of the people that went to get a job in game programming (a decent chunk just do something in general software development) did so through their professors and their portfolio. I've heard it everywhere, and I'll say it as well: You will probably need contacts to get into game development if you're going for anything above indie-level. (That isn't to say that indie development is a bad route by it being easier to get into. I'd prefer to do indie dev if I could keep myself afloat.)

Depending on what part of development you end up doing, you might not touch math at all, but that's not very common. If you're tweaking collision detection, you'll need to know a decent chunk of math. The amount varies based on what the collision system is. If you're the guy that writes shaders for the game, then you better know a metric-shit-ton of math.

The specific type of math varies but tends to stick around linear algebra, geometry, and statistics. Calculus is used for more complex situations, such as procedural generation and shaders. 2D games can be built without thinking in vectors, even though you will probably end up using them without knowing it. A 3D game can be made without the mindset, but you're not going to get very far since libraries can only abstract so much.

Something else that's handy to know is micro-optimizations through hardware. Information about SSE, cache misses, branch prediction, swizzled textures, etc. are used quite frequently to get decent performance.

So really all you need to program a 2d game is game logic and simple math. 3d shouldn't be that much harder.
As I (and others) have mentioned, this isn't the case. 3D games tend to require a much more sophisticated level of math. This is for movement, collision detection, rendering/shaders, etc.

My advice when aspiring to be any specific type of profession is to look at job listings.
Very, very good advice.
The only thing you really need, is a LOT of free time!

Though patience is important too, over time everything fits into place.
If you are wanting to know an important skill, I would say it's confidence.

Just to note, 3D games are only a little harder than 2D.
The important parts, are game design, logic, and understanding...
When you get good at 2D, 3D becomes easy... You just have to learn OpenGL.

Really, making software just takes time;
No one is born with the skill, and it isn't really hard either. It simply takes time to learn everything.


The math used isn't really advanced, I have seen 2D games that don't do any except basic arithmetic.
3D does use some math, but nothing more advanced than high school honestly...

I never even graduated (GED), and I have made almost a dozen FPS games!
closed account (3qX21hU5)
I never even graduated (GED), and I have made almost a dozen FPS games!


Could you provide some samples and the code please? I am just curious about people that say you don't need to know math to program games. Which I believe is just plain untrue from my experiences so would love to see how you did it without any advanced math. Specially the Collision Detection, AI, and Movement.

As I said before to Fredbill I am not trying to call you out or anything I am just curious . I would be more then willing to share my game projects I have done also though they are only simple 2D puzzle games and a 3D Shooter that is really crappy lol.
Yea I know that, but it's true lol. My dad took away my laptop and I'll try to get it back today.

All I use are rectangles for collision and X & Y coordinates. Very simple IMO.
closed account (3qX21hU5)
No need to rush my last post was direct toward Mitch.
Last edited on
I want to program games, but I am not good with graphics (i.e. making the little figures and surroundings look good). Do you guys think that is important for a C++ game programmer?
closed account (3qX21hU5)
As is drawing up the models/sprites? If so then no that isn't important really. Usually if you are in a big company they will have plenty of artists to do that work. And if you want to go into Indie you usually team up with a artist to make a game. At least that is how it usually goes 1 artist and 1 programmer. It is really rare to find someone that can do both really good.
Last edited on
@Zereo that is exactly what I am talking about. My problem is finding someone to work with.
I want to program games, but I am not good with graphics (i.e. making the little figures and surroundings look good). Do you guys think that is important for a C++ game programmer?


Your question is very vague, are you talking about using third party software to make the model (artist) or are you talking about making the graphics look good in terms of lighting, reflections, shadow mapping, bump mapping and texturing.

3D does use some math, but nothing more advanced than high school honestly...


Just to note, 3D games are only a little harder than 2D.


I agree with everything Zereo has said on this. beg to differ...
Last edited on
Your question is very vague, are you talking about using third party software to make the model (artist) or are you talking about making the graphics look good in terms of lighting, shadow mapping and texturing.


Both. I am not artist, at all. I have very little artistic ability. In fact my 8th grade art teacher corrected my stick men.
Pages: 123