Zomis / Server

Flexible multi-purpose Server, intended for turn-based multi-player games
1 stars 0 forks source link

Replays #8

Open Zomis opened 9 years ago

Zomis commented 9 years ago

Support a replay system, save played games to a database. (like Minesweeper Flags Extreme)

Zomis commented 9 years ago

or save replays to files and the summary of the replay to a database.

What saving method is best probably depends on the game. Possible options for file format could include JSON and Groovy DSL....

Maaartinus commented 9 years ago

I'd suggest an unstructured format simply joining all the moves, just separated by newline. Something like this works universally for all games, assuming their turns contain no newlines. The client can simply reply them the way it plays received moves. So for UTTT you'd use something like "0 0\n1 1\n4 5...".