Beginning C++ Game Programming
上QQ阅读APP看书,第一时间看更新

Meet C++

One question you might have is, why use C++ at all? C++ is fast, very fast. What makes this the case is the fact that the code that we write is directly translated into machine executable instructions. These instructions make the game. The executable game is contained within an .exe file that the player can simply double-click to run.

There are a few steps in the process. First, the pre-processor looks to see if any other code needs to be included within our own code and adds it when necessary. Next, all the code is compiled into object files by the compiler program. Finally, a third program, called the linker, joins all the object files into the executable file, which is our game.

In addition, C++ is well established at the same time as being extremely up-to-date. C++ is an object oriented programming ( OOP ) language, which means we can write and organize our code in a proven way that makes our games efficient and manageable. The benefits, as well as the necessity for this, will reveal themselves as we progress through the book.

Most of the other code to which I referred is SFML, and we will find out more about SFML in just a minute. The pre-processor, compiler, and linker programs I have just mentioned, are all part of the Visual Studio Integrated Development Environment(IDE).