I am fairly new to programming and am trying to grasp some of the concepts of how everything ties together with c++. What understand so far is that c++ is the numbers and calculations part of a game. (At least I think). What I'm curious about is how c++ is used to program a game. Is it c++ alone that is building the game? Because when I see examples of games build with c++ they all are usually text based games and numerical games built within the command prompt. I'm curious to how a c++ program is transformed into a 2d/3d visual game. I would love any help you guys could give and would greatly appreciate it.
C++ + scripting language + music + sound effects + physics engine + 3d assets + (maybe story) + gameplay + money (depending on game type) + motion capture + AI + general effects + etc. = 3d game.
Game engines help.
Thank you for your response. That answered a lot of questions and actually sparked a new question. So if all those different elements are part of what makes a 3d game, then how are those elements combined with c++? Are they written as part of the code? Or are they called forth within the c++ code to do things such as, (If x happens, then enable sound effect). Also, are all the elements packaged together within the same code? Or are they in separate folders that all are working together. And lastly (sorry for so many questions...) are all these elements too written in the c++ programming language or is a game built off of different languages that communicate with each other?
Thank you! Sorry for asking so much. I'm just very interested in programming and how everything works. If you have any good book recommendations please let me know.
As i am as interested in game programming as you are, i can answer some.
The game engine (comprises of physics engine, AI engine, particle engine, sound engine etc.) is written mostly in c++. The game itself is written in a mixture of c++ or any language the developer chooses. Depending on the engine you are using, you may not use c++ but the language of the engine.
Unreal engine uses unrealscript (may be changed soon), cryengine uses lua (scripting language) and c++, unity uses c#.
The if x happens, enable sound effect is done with a scripting language (80% sure).
The game engine consists of several files.
The books i'm currently using are jumping into c++, this site's pdf tutorial, beginning game programming with c++. I see c++ primer recommended a lot and i wish i could get it but i can't.
Thank you very much for your response once again Nathan. Things are starting to slowly but surely come together and make some sense. I will definitely take a look into both "jumping into c++" and "c++ primer". I'm actually currently in college majoring in CIS and am getting ready to jump into CS111. I figured it might be a good idea to start getting my feet wet with some c++ which happens to be the core focus of that class. Once again thank you!