- Account creation
- Create game (2-4 players)
- Join game
- Leave game
- Map initialisation and deployment of wizards
The only thing you can do at the moment is end your turn - so there no game play yet. Before I get onto that I need to figure out how to make both synchronous and asynchronous games work properly. The underlying functionality is basically the same. Synchronous games operate under tighter rules - you have a relatively short time limit for your turn. If you fail to respond in time your turn is ended automatically. If you get disconnected your wizard will be taken over by the AI, but I want to allow players a chance to reconnect to the game if they just experiencing internet glitches.
Asynchronous games are played over a much longer period of time, but still with a time limit. This will most likely be some modified chess clock style of timer, where you have a total time limit for completing all your turns, and the time counter counts down while it is your turn. The other thing I need to do with asynchronous games is store and retrieve the game state in a database. Synchronous games are totally 'live' and they reside in the servers memory until the game is over.
The game state is represented by an initial state and a list of game events, which can be anything that happens in the game, such as moving a creature to a hex or an attack. This list of events allows players, or even observers, to view a game from the start - or even to watch completed games. I also want this playback feature to operate with rewind controls so you can step backwards or forwards in the game sequence. This requires a little extra data storage because for each event I have to store the state 'changed from' as well as state 'changed to'. I also need to pack the data into the smallest possible size for network transmission, which means using the minimum number of bits for a piece of data. The Lidgren network library handles this pretty well. I am pretty confident that an average game will be packed into around 20-30kb in size, which is pretty small, but the smaller it is the more games a single server can handle.
Finally, before I start on the game player proper, I need a system for local games. Internally the same message transfer occurs between the client and server functions, but I don't need to update the game state on both server and client side since there will only be one representation of the game. It's a bit more fiddly than it sounds, but I hope it won't take too long. Then the game will have solid foundations for local and network play and I will proceed to creature summoning, movement and combat.
Here is a three player game set up from a client point of view with three wizards deployed. Note, the final game will not look like this, so please don't make fun of my little wizard models!