170 likes | 181 Views
Explore how a single program can support different games, including designing and implementing games in a general manner. Discover the program's requirements and limitations, and learn about future work possibilities.
E N D
Generic Gaming Engine Andrew Burke Advisor: Prof. Aaron Cass
Problem How can a single program provide a medium for playing more than one game? How can games be described in a general manner? How will an outside agent make use of the program’s functionality?
Presentation Overview • What are the program’s requirements? • What types of games will be supported? • How will users interact with the program? • How are games designed and implemented? • What are the limitations of the program? • Where does it go from here?
Requirements • Functional: • Any system capable of running Sun Java 1.4.2 • Must pass String input • Can accept text-based output • Nonfunctional: • Robust • Quick • Usable
Game Constaints • Rectangular board • Turn-based • Two players • Two pieces may not occupy a single cell simultaneously • Maximum dimensions 50 x 50 cells
Program Interaction • Client-engine interaction occurs through a single Java Class • Contains API and data access methods • Initialization, update, and move verification • Read access to state and move history
Game Design • Finite State Machine • Rule set • Java program • Must import genericgamingengine package • Must specify and pass input to the Game class
Finite State Machines • Describe game progression and rule changes • Includes a transition for each movement scenario • Designed using the State Machine Compiler • http://smc.sourceforge.net/
Sample FSM: Checkers Checkers FSM “StandardMove” [gameEnded() == false] getInput() “AttemptedMove” displayError() “EndingMove” [opponentEliminated() == true] endGame() showWinner() “InitGame” getInput() Start Normal GameOver “Promote” [pieceOnBackRow() == true] promote() getInput()
Rule Set • File containing rules for: • Piece types • Piece movement rules • Board dimensions • Board setup • Written using a small programming language • Users may write their own functions as combinations of supplied primitives
Program Limitations • Game variation limited by primitive list • Simple interface • Large games run slowly • Current interface inadequate for large games
Future Work • Distributability • Simultaneity • User interface • Primitive list expansion