Blog do projektu Open Source JavaHotel

sobota, 23 września 2017

New version of Civilization the Board Game

Introduction
I deployed next version of my computer implementation of  Civilization The Board Game. The implementation consists of three parts:
New features
  • Game progress saved
  • Game resume
  • Two players game
Game progress saved
The game is saved constantly in redis key/value database. It is done automatically in the background in a transparent way, there is no "Save" button. The server side of the game is stateless, it is only computational engine, redis datastore is a memory cache. Redis is accessed through an interface, I'm going to prepare HBase version as a warmup. Stateless is a very important feature, in the imaginative future when thousands of players are swarming, load balancing and traffic redirection can be applied. 

Game resume
A game can be left and resumed at any time. Just select a game and the player is pushed immediately into the middle of the battle.

Also, two players game can be resumed but second players should join to continue the game.
Two players game
Two options of creating new game are available: "Training" and "Two players game".

Training is a single player game, just to get one's hand in. "Two players game" is more serious matter, test yourself in hand-to-hand battle. Select opponent civilization you want to fight against and wait for the contester.

Joining the game
Select the game from the waiting list and the contester together with one who threw down the gauntlet are moved into the middle of the duel.

Leaving the game
The player can leave the game by clicking the close icon in the upper right corner of the board.
Leaving the game legally unlocks the game and remove it from the waiting list. But because the game is saved automatically while playing, event after abruptly closing the browser the game can be resumed exactly at the same stage whatsoever. The game is removed from waiting list after 24 hours of inactivity.
Next steps
Make map and player deck more user-friendly.

Brak komentarzy:

Prześlij komentarz