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

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
主站蜘蛛池模板: 徐闻县| 积石山| 青田县| 宜章县| 乌兰浩特市| 辉县市| 宜章县| 清原| 彭泽县| 铁岭市| 琼海市| 凤城市| 肇庆市| 永平县| 宜兴市| 剑阁县| 富阳市| 衡阳县| 玛曲县| 大城县| 栖霞市| 简阳市| 东丽区| 敦化市| 临澧县| 新晃| 湾仔区| 和龙市| 原平市| 景德镇市| 沙洋县| 恭城| 福贡县| 洪江市| 邹城市| 泗洪县| 临城县| 尖扎县| 安龙县| 上蔡县| 乌拉特中旗|