210 likes | 299 Vues
State-Driven Programming for Computer Games. Georgiy Korneev Anatoly Shalyto. Saint Petersburg State University of Information Technologies, Mechanics and Optics. State-Driven Programming. State Control state Computational state Transition Input actions Events Input variables
E N D
State-Driven Programming for Computer Games Georgiy Korneev Anatoly Shalyto Saint Petersburg State University of Information Technologies, Mechanics and Optics
State-Driven Programming • State • Control state • Computational state • Transition • Input actions • Events • Input variables • Output actions • Interacting automata system State-Driven Programming for Computer Games
Astronaut (1) State-Driven Programming for Computer Games
Astronaut: States State-Driven Programming for Computer Games
Astronaut: Actions State-Driven Programming for Computer Games
ApplicationFields • Game engine • Artificial intelligence State-Driven Programming for Computer Games
Game Engine (1) • World • Locations • Characters • Animation • Physics State-Driven Programming for Computer Games
Lines State-Driven Programming for Computer Games
Lines Automata Cell Control Game Control State-Driven Programming for Computer Games
Game Engine (2) • Lode Runner • Platform, puzzle 2 automata • Escape • Arcade 4 automata • MiniStrategy • Turn-based strategy 4 automata • Sea Battle • Turn-based tactics 6 automata • Automatic Bomber • Arcade 14 automata State-Driven Programming for Computer Games
Characters Bots Standalone Cooperating Terrarium (Microsoft) Artificial Intelligence (1) State-Driven Programming for Computer Games
Robocode (IBM) CodeRally (IBM) Artificial Intelligence (2) State-Driven Programming for Computer Games
Artificial Intelligence • Electric Jungle (Sun) • 1 automaton • 3 automata • 5 automata • Escape (Simple Arcade) • Multiagent system (4 automaton types) • Aladon (Russian Role-Playing Game) • 6 automata State-Driven Programming for Computer Games
UniMod: State-Driven Programming Integrated Development Environment • UniMod = UML + Switch-Technology + Java + Eclipse + Sourceforge • Homepage • http://unimod.sourceforge.net/ • Links • http://www.eclipseplugincentral.com/Web_Links-index-req-viewlink-cid-335.html • http://www.codezoo.com/pub/component/260?category=97 • http://today.java.net/pub/n/UniMod • http://java-source.net/open-source/uml-modeling/unimod • http://www.open-open.com/open132928.htm State-Driven Programming for Computer Games
State-driven Object-Oriented Design • Two types of diagrams • Automata Interaction Diagram • Describes static structure • Based on Class Diagram • State Diagram • Describes behavior • Based on State Charts State-Driven Programming for Computer Games
Game of Poker State-Driven Programming for Computer Games
Automata Interaction Digram State-Driven Programming for Computer Games
Main State Diagram State-Driven Programming for Computer Games
Nested State Diagram State-Driven Programming for Computer Games
State-Driven Programming • Russian version • http://is.ifmo.ru/ • English version • http://is.ifmo.ru/english/ • Switch-Technology • http://en.wikipedia.org/wiki/Switch-technology State-Driven Programming for Computer Games
Thank You for Attention State-Driven Programming for Computer Games