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

Understanding what a variable is and what it does

What is a variable? Technically, it's a tiny section of your computer's memory that will hold any information that you put there. While a game is running, it keeps track of where the information is stored, the value kept there, and the type of that value. However, for this chapter, all you need to know is how a variable works. It's very simple.

What's usually in a mailbox, besides air? Well usually there's nothing, but occasionally there is something in it. Sometimes, there are letters, bills, a spider, and so on. The point is that what is in a mailbox can vary. Therefore, let's call each mailbox a variable.

In the game development world, some simple examples of variables might be:

  • playerName
  • playerScore
  • highestScore
主站蜘蛛池模板: 新丰县| 个旧市| 嵊州市| 贞丰县| 淮滨县| 广德县| 离岛区| 万载县| 汪清县| 通州区| 南召县| 天水市| 南召县| 恭城| 鄄城县| 共和县| 玉田县| 禄丰县| 绥中县| 洮南市| 霞浦县| 博兴县| 海南省| 沾益县| 崇文区| 报价| 乌拉特后旗| 东城区| 离岛区| 卫辉市| 赤峰市| 钟山县| 九龙县| 公安县| 沾益县| 兰州市| 徐州市| 肥城市| 普兰店市| 两当县| 磴口县|