官术网_书友最值得收藏!

Meet C++

Now that we know what games we will be building, let’s get started by introducing C++, Visual Studio, and SFML. One question you might have is, why use the C++ language at all? C++ is fast – very fast. What makes this true is the fact that the code that we write is directly translated into machine-executable instructions. These instructions are what make the game. The executable game is contained within a .exe file, which the player can simply double-click to run.

There are a few steps in the process of changing our code into an executable file. First, the preprocessor looks to see if any other code needs to be included within our own code and adds it. 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 for 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 using well-tested conventions that make our games efficient and manageable. The benefits as well as the necessity of this will reveal themselves as we progress through this book.

Most of this other code that I referred to, as you might be able to guess, is SFML, and we will find out more about SFML in just a minute. The preprocessor, compiler, and linker programs I have just mentioned are all part of the Visual Studio integrated development environment (IDE).

主站蜘蛛池模板: 和林格尔县| 新竹县| 孟津县| 盐亭县| 漠河县| 万源市| 阳高县| 呈贡县| 阿尔山市| 桃源县| 高清| 连江县| 平舆县| 新巴尔虎左旗| 莆田市| 德惠市| 财经| 皮山县| 台东市| 华阴市| 静宁县| 扶余县| 武鸣县| 虞城县| 霞浦县| 石台县| 永安市| 同仁县| 喀喇沁旗| 岫岩| 大悟县| 新巴尔虎右旗| 凭祥市| 买车| 新昌县| 凤翔县| 讷河市| 巩留县| 洛宁县| 东源县| 株洲县|