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

The sensor system

Our AI characters need to know about their surroundings and the world they are interacting with in order to make a particular decision. Such information may be the following:

  • The position of the player: This is used to decide whether to attack or chase, or keep patrolling
  • Buildings and objects nearby: This is used to hide or take cover

  • Player's health and its own health: This is used to decide whether to retreat or advance
  • Location of resources on the map in a Real-Time Strategy game (RTS): This is used to occupy and collect resources required for updating and/or producing other units

As you can see, choosing the right method to collect game information can vary a lot depending on the type of game we are trying to build. In the following sections, we look at two basic strategies: polling and message (event) systems.

主站蜘蛛池模板: 军事| 平罗县| 沂南县| 姚安县| 深泽县| 海淀区| 锡林浩特市| 卢龙县| 凤冈县| 马山县| 依兰县| 定结县| 扎囊县| 科尔| 临邑县| 新疆| 鲁甸县| 汶上县| 灯塔市| 林州市| 黄梅县| 泊头市| 定兴县| 乐安县| 怀集县| 黄大仙区| 福清市| 泉州市| 梁平县| 江孜县| 大埔区| 汾阳市| 海伦市| 安龙县| 三穗县| 屏山县| 湘西| 阳新县| 衡东县| 陆丰市| 建宁县|