   Can someone tell me how making a game works?
  next year im going to college for computer programming and i want to learn some basic stuff before i start the class. basic stuff include the hello world, making a calculator, and eventually....pong... the programs i currently have on my pc are blender and visual c++n 2010 express. my questions on how 3d games work are strictly curiosity.1. does programming tell the character how to move in a world?2. does blender or another 3d program make the models and world?3. how would a person bridge the two programs to make a game?4. does blender animate the joints or does programming tell the joints how to move?thank you ahead for answering my questions. I will spend most of my time hear learning the absolute basics and only post if i have a question.   
  Here are some quick (and not in any way comprehensive) answers:Quote:1. does programming tell the character how to move in a world?A character's motion is often a combination of animations (created in an external program such as Blender) and code (i.e. programming). Generally, although the data for the animations is created in a modeling program of some sort, it is the code that 'makes the animations animate'.The code that makes a character move can take many different forms and can be executed in more than one place. For example, some of the code related to animating a character may be executed on the GPU rather than the CPU. Furthermore, code related to 'gross' character motion or character control may be written in a scripting language (e.g. Lua), or in the 'native' language of the application (C++ in your case).Quote:2. does blender or another 3d program make the models and world?Yes, usually (although not always).Quote:3. how would a person bridge the two programs to make a game?Generally the assets are created in programs such as Blender, Photoshop/GIMP, etc., and are then distributed in some form with the game. When the game is run, these assets are then loaded and used in the game as needed.Quote:4. does blender animate the joints or does programming tell the joints how to move?It can be either or both. (For example, sometimes procedural animations or motion due to inverse kinematics will be blended with pre-existing animations created in a modeling program such as Blender.);  First of all, I should tell you that Visual C++ 2010 Express and Blender are very different programs. I'm sure as I answer your questions this will become more apparent, but just be aware that.1) If by "programming" you mean the game or application you build, partly yes and no and it could also depend on what you are trying to achieve. There are many ways the "character" can move in a game, ie. boned animation, user input (joystick), physics, etc. A good chunk of games nowadays use a good mix of that.2) This answer sort of builds on the last. Blender is a tool that allows you to model objects and/or animate them. It then allows you to save all that data into files (game assets) which your game/application would load in. Inherently, everything produced in programs like Blender is static.3) I guess the shortest answer to this is: By doing. Essentially, both programs provide the tools needed to build a game. It's just that one builds the actual code and the other builds assets that the code makes use of.4) Yes, Blender animates the bones and joints, however you will need to replicate this behavior in your application/game with code if you are starting from scratch.My recommendation is do some reading as you're doing your little projects. I would go in the logical order of:- Learning C++ along with the Standard Template Library should you choose to use it.- And even if you do use the STL, I highly recommend learning the inner workings of data classes like Vectors, LinkedLists, Tables, etc...- Once you have a handle on C++, the Windows API is essential (or whatever system API you plan to target).- Finally, you will need to learn ow to use a graphics library. The two main ones are OpenGL and DirectX.There are plenty of resources online to get you started. Good luck with your endeavors!-Sebastian   ;Quote:Original post by Proto_Blazenext year im going to college for computer programming and i want to learn some basic stuff before i start the class. basic stuff include the hello world, making a calculator, and eventually....pong... the programs i currently have on my pc are blender and visual c++n 2010 express. Your college may or may not teach you C++.  Programming is about data structures and algorithms.  Once you have mastered the concepts of both, you should be able to work in any language.So you want to learn c++.  Here's the recommended list of books. Read them mostly in the order listed:# "Accelerated C++" Andrew Koenig and Barabara Moo# "The C++ Standard Library" Nicolai Josuttis# "Effective C++" Scott Meyers# "More Effective C++" Scott Meyers# "Effective STL" Scott Meyers# "Exceptional C++" Herb Sutter# "More Exceptional C++" Herb SutterWorking through the books will give you a very solid understanding of the C++ language.  You could learn more about the language than many college professors can teach you.Quote:my questions on how 3d games work are strictly curiosity.1. does programming tell the character how to move in a world?2. does blender or another 3d program make the models and world?3. how would a person bridge the two programs to make a game?4. does blender animate the joints or does programming tell the joints how to move?There are several things that need to happen to make the magic work.First, let's cover the art side.There is a model.  You can use Blender, or 3D Studio Max, or Maya, or whatever else you want.  The model has textures, or skins, the artwork that covers the mesh.  Most of the professional world uses Maya for the models and Photoshop for the textures.  Other tools like z-brush and Poser may be used along with them.Next, the model is hooked up with joints and bones.  It sounds like you know about that.  This takes place inside the same tools and programs listed above.  Then animators use the tools to create the animations.  These are short clips, such as a "run cycle", and a starting and stopping sequence.  The animators export these into the data.Next, the code side.Your code needs to be able to load the models, textures, bones, and animations.  It is usually best to use an existing engine for that.  It takes a lot of math to convert an animation sequence into a visible result on screen.Running the animations will cause the models to animate in place.  They won't move anywhere.  That is where your code comes in.  You need code that calculates how the models will move.  You need code to adjust the camera.It takes several iterations between animators, programmers, and designers, to figure out exactly how fast the motions should be.  The animations need to move at the same speed as the in-game calculations, otherwise things will slide around.Generally it is best to write the code to work with any model.  There will be a set of tools designed to edit maps.  The maps contain markers indicating details of the world.  The terrain mesh or navigation mesh will have markers about how it should interact.  Terrain might be marked as grass, or road, or lava.  There will be tools to match up items like "health pack" with the numbers of how much health to restore.  There will be tools to match up "gun" with how much damage it does, the speed of the projectile, the artwork for projectiles, how many shots it holds, how long it takes to reload, time between shots, etc.  Inside the map editor, an item might be marked as "airplane" or "gun" or "health pack".  Then in code, you don't have to worry about where objects are.  If the player interacts with a health pack, you run the health pack routine.  If they interact with a gun, you run the routine that gives them that weapon.  When the player moves, you can evaluate the terrain they are on and perform the matching move routine.It takes a lot of work, but when it is put together well the results are very compelling.Quote:thank you ahead for answering my questions. I will spend most of my time hear learning the absolute basics and only post if i have a question.Ask lots of questions.  The success of the site is based on people asking questions and giving answers as their experience allows.   ;  ok then, how does making a 2d game work? im assuming you dont have to work with the z axis. but how do the sprites get animated? and how is a world built?   ;Quote:Original post by Proto_Blazeok then, how does making a 2d game work? im assuming you dont have to work with the z axis. but how do the sprites get animated? and how is a world built?It's pretty much the same for any game. You update the state of the simulation, and then you just draw out that state on the screen in the form of graphics. You animate the same way as on paper. You just a different picture on the screen every time. The screen is just like a big lite-brite. You tweak all the color values as needed, and the screen is NOTHING but a communication device for the user. Your entire program will exist as a bunch of data structures being processed in memory, and can run by itself. Drawing is simply done so the user can be informed of the current program state, and give input.Lots of newbies don't understand that concept, and they want to know how to make whatever is on screen 'do something'. That's backwards. You can draw whatever you want on the screen, but you can't make it do anything. Because there is nothing there to do anything.For instance, if you want a program that just draws an object bouncing off the edges of the screen, you need to have a loop that just processes the location and the size of the object against the coordinates of the screen boundaries, and you modify the location based on some velocity value.And every time you go through that loop of updating the object's position, you will also erase the screen, and then draw a picture of the object in it's new location.The user will see the illusion of an animated object bouncing from screen edge to screen edge on their monitor. But that picture is only on the screen to inform the user of the current state of the simulation.So the program will have a loop that runs an update portion on the logic, and then a draw command, eg:begin main loop    update   modify the location of the object by velocity value(s)   check if the object has touched the edge of the screen, and if it has   modify the velocity value(s) so it bounces away next frame    draw   erase screen   draw a picture with object at it's locationend main loopAs for 3d models, they are all just lists of vertices, and whatever associated data they need on a case by case basis. Whatever editor you use will just be used as a visual editor for those vertices and associated data. You then export this data out in a format that is meaningful to your own program, and when your program runs, it will read that data into it's own structures.   