Case Study
This document is a case study based on the Prisoner's Dilemna being modelized to prove the design concepts.
The steps for creating a turn-based game are :
- write the game design
- modelize the game data, rules and mechanisms
- implement the modelization
Most of the time the development process iterates over those steps until the game is finished.
Because of the flexibility of the framework a change in the game design impacts minimal modification in both the modelization and its implementation.
The purpose of this case study is to modelize a basic game in order to show how it fits within the framework design concepts.
Data
The first step is to list the data needed for this game.
Context
The game state contains general information that needs to be kept from turn to turn :
- player list
- current turn number
- turn at which the game ends
Player
The player stores information tied to each player :
Order
Orders are sent from players to the moderator each turn to indicate whether they defect or they cooperate :
Result
Results are sent from the moderator to players to indicate a turn result :
Update
Updates are sent from the moderator to players to update the game state :
- players gains
- end of game
Units
The next step is to detail the units required to have the game work the way expected.
Security
The orders need to be checked in order to validate their parameters :
Computation
The computation unit needed receives both players decisions and creates the result and the update :
- a custom computation unit
Synchronization
Both player orders are multi-orders therefore a synchronization mechanism is required :