Model-Based Design of Computer-Controlled Game Character Behavior
Recently, the complexity of modern, real-time computer games has increased drastically. The need for sophisticated game AI, in particular for Non-Player Characters, grows with the demand for realistic games. Writing consistent, re-useable and efficient AI code has become hard. We demonstrate how modeling game AI at an appropriate abstraction level using an appropriate modeling language has many advantages. A variant of Rhapsody Statecharts is proposed as an appropriate formalism. The Tank Wars game by Electronic Arts (EA) is used to demonstrate our concrete approach. We show how the use of the Statecharts formalism leads quite naturally to layered modeling of game AI and allows modelers to abstract away from choices between, for example, time-slicing and discrete-event time management. Finally, our custom tools are used to synthesize efficient C++ code to insert into the Tank Wars main game loop.
KeywordsClass Diagram State Diagram Board Game Tactical Decider Fuel Level
Unable to display preview. Download preview PDF.
- 1.de Lara, J., Vangheluwe, H., Alfonseca, M.: Meta-modelling and graph grammars for multi-paradigm modelling in AToM3. Software and Systems Modeling (SoSyM) 3(3), 194–209 (2004)Google Scholar
- 2.Electronic Arts. EA Tank Wars (2005), http://www.info.ea.com/company/company-tw.php
- 4.Gill, S.: Visual Finite State Machine AI Systems. Gamasutra (November 2004), http://www.gamasutra.com/features/20041118/gill-01.shtml
- 5.Harel, D., Kugler, H.: The rhapsody semantics of statecharts (or, on the executable core of the UML). In: Ehrig, H., Damm, W., Desel, J., Große-Rhode, M., Reif, W., Schnieder, E., Westkämper, E. (eds.) INT 2004. LNCS, vol. 3147, pp. 325–354. Springer, Heidelberg (2004)Google Scholar
- 7.Onuczko, C., Cutumisu, M., Szafron, D., Schaeffer, J., McNaughton, M., Roy, T., Waugh, K., Carbonaro, M., Siegel, J.: A Pattern Catalog For Computer Role Playing Games. In: Game-On-NA 2005 - 1st International North American Conference on Intelligent Games and Simulation, pp. 33–38. Eurosis (August 2005)Google Scholar
- 8.Pickett, C.J.F., Verbrugge, C., Martineau, F.: (P)NFG: A Language and Runtime System for STructured Computer Narratives. In: Game-On-NA 2005 - 1st International North American Conference on Intelligent Games and Simulation, pp. 23–32. Eurosis (August 2005)Google Scholar
- 9.Unreal Technology. The Unreal Engine 3 (2007), http://www.unrealtechnology.com/html/technology/ue30.shtml