O'Reilly logo

AI Game Programming Wisdom 4 by Steve Rabin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.10Level Up for Finite State Machines: An Interpreter for Statecharts

Philipp Kolhoff—KING Art

pkolhoff@kingart.de

Jörn Loviscach—Hochschule Bremen

jlovisca@informatik.hs-bremen.de

Finite state machines (FSMs) have become commonplace in game programming [Fu04]. Their uses range from simple game logic to complex behavior of non-player characters (NPCs). However, FSMs have a tendency to confront the programmer with an explosion of states and to become heavily entangled with other parts of the game code. Harel’s statecharts provide some much-needed improvements over FSMs that help to alleviate these problems [Harel87].

Many game programming scenarios that stretch FSMs to their limits can be formulated with statecharts in a tidy and intuitive fashion. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required