The first thing that is obvious from the description of our beginning goals for the board game project is that we’ll have players, and some players will be able to do some things, and some won’t. So we need some sort of user management, which will let us determine who can do what actions. It doesn’t need to be super-complicated, we probably only have 2 or 3 levels or roles — an administrator, a player and game host, or a game master. Precisely what those roles mean may change based on the kind of game, but that’s what we’re looking at right now.
Players should be able to initiate games, and invite other players. For checkers, someone would host the game, and the other player would be the opponent. For the VTT, someone would create a map, add NPC tokens, and invite the people playing their game to view it. From that, we can see that we need to be able to draw a map of some kind, and have tokens on it that will let people move them around on the board.
We’ll need to be able to validate moves, both that whomever is moving the token has the right to move the token — I can’t move my opponents pieces in checkers, for instance (unless maybe the ones I’ve captured.) I have to make a legal move — I can’ t move onto the wrong color square in checkers, if I have a jump I must take it, for example. [Legality of moves isn’t part of our spec for the VTT, that will be handled socially, not in code.]
Finally, we’ve got a chat log that will let users type text at each other, and will let them make dice roles which are reflected in the chat. Dice rolling is pretty much specific to the VTT for now, but if we ever do backgammon or a game like Monopoly then we’ll need to have dice rolls.
So for me, I see four basic phases:
- Users and Security
- Basic display and token movement
- Chat and dice rolling
- Moves and rules checking