Defense behavior of real time strategy games: comparison between HFSM and FSM - Rahmat Fauzi; Mochamad Hariadi; Muharman Lubis; Supeno Mardi Susiki Nugroho (Institute of Advanced Engineering and Science, 2019)
RTS Game is one of the popular genre in PC gaming, which has been played by various type of players frequently. In RTS game, NPC Defense Building (Tower) has attacking behavior to the closest enemy without considering certain enemy parameters. This causes the NPC Tower to be more predictable by the opponent and easily defeated if NPC attacked by enemies in the group. Thus, this research simulates NPC Tower using Hierarchical Finite State Machine (HFSM) method compared with Finite State Machine (FSM). In this study, NPC Tower detects enemies by seeing at four parameters namely NPC Tower Health, Enemy's Health, Enemy Type, and Tower Distance to enemies. NPC Tower will attack the most dangerous enemy according to the ‘Degree of Danger’ parameter. Then use the decision-making logic of the rule-based system. The output of NPC Tower are three type of behaviors namely Aggressive Attacking, Regular Attacking, and Attack with Special Skill. From the test results of 3 NPC Tower, Kamandaka NPC Tower with HFSM method is winning 8.92% compare to Kamandaka Tower with FSM method. For Gayatri Tower NPC obtained equal results using both HFSM and FSM. Meanwhile, Adikara NPC with HFSM method is 4.62% superior to Adikara Tower with FSM method.