I wrote very basic of game programming before, but I forgot to answer your questions.
"How the program works in video games?"
Like last time, written program in C or C++ controls video game's behavior, but you may not able to imagine how the code goes to video game machines.
First, you need is development environment. You need to have a test kit and SDK installed on your PC. Test kit is a developer version of the game system connected to the PC somehow. It cost much and you cannot get it until your company makes developer contract with first parties. You do not need such a thing if you are making PC games. SDK stands Software Development Kits, PC application to work with test kits. Microsoft Visual Studio works as PC game development application for example.
Assuming you have a test kit hooked and SDK installed on your PC, then how can you program video games? First you write a program in C or C++ usually like last time. It is kind of human familiar looking so people can understand. You need to COMPILE it first, which is making sure that code is understandable by PC. It checks glamour like period at the end of sentence. It gives you an error if you forget to add ";" as the end of each sentence for example. It is very strict because no vagueness allowed. The code is translated to machine language that you don't usually have to care. Next PC does LINK process. LINK process is to make sure that everything defined connectable and make executable file or the game. Executable files is just a binary file that people cannot read and understand usually. Then the executable files will be transfer to the test kit to run it. You keep doing this until the code becomes good to go.
How to display pictures and play sound? Program called "library" is provided by the First party. It is sets of functions you can call to do such things. For example, there are something like DrawColorTriangle() to draw a triangle, PlaySound(), (actually such functions are not that simple, but I listed as a concept...) DrawColorTriangle needs x,y of 3 corners and color, PlaySound() needs sound file name so you can pass these to the functions when you call. DirectX-SDK was one of the libraries of PC game development.
I guess that now you understand how to make your program work in video game machine but at the same time you know that it is a long way to be a game programmer. Still want to be a game programmer? You can do it if you think this article interesting!
Hiro@LA
All News |
All Blogs
How to program video games
Published
Wednesday Jul 16, 2008



