Glenn De Jonghe : Modelling of NPC's as Interacting Statecharts




Since video games nowadays got more complex, writing consistent and re-usable code for game AI has become very hard. In this paper we will look at the modelling of Non-Playable Characters using the statechart modelling language and will see that this method has many advantages. This is shown in a small tanks game, developed for the purpose of this paper, where the player has to battle one or more NPC tanks with statechart-modelled behaviour. We will also inspect if modelling other components of the game has any benefits. For instance a completely modelled environment would make it possible for the NPC's to interact with it solely using events.