/BgpXox

A minimal Lobby-Service compliant browser game. Serves as default game for the Board-Game-Platform Micro-Service.

Primary LanguageJava

Xox

A Lobby-Service compatible implementation of the game "Tic Tac Toe".

preview

About

This repository contains the sources of a Lobby-Service compliant sample game.

This implementation amends the official Lobby-Service API documentation by practical interaction examples. Covered key features are:

  • Registration at the Lobby-Service during game power-up / un-registration on game shutdow.
  • Delegated user management. This game relies on the LobbyService to identify and authenticate users, via OAuth2 tokens.
  • Dynamic maintenance of parallel game sessions at runtime, accessible through a Lobby-Service compliant REST layout.
  • A self-hosted web-interface, strictly limited to game-specific functionality.

Architecture

The game's resource layout consists of two branches:

  • /xox/webui/games/{gameid} for a session specific interactive web-interface.
  • /xox/api/... for a RESTful API (accessed by the web-interface). api

Credits: The web UI is based on an existing open source implementation.

Deployment

This game requires a deployed instance of the Lobby-Service, with enabled Lobby-Service Web Interface to run. It registers at the lobbyservice, using a game-service account.

Use one of the below deployment options to try the game:

BGP (Docker-compose)

This game is the default game sample module of the BoardGamePlatform. Follow the BGP docker-compose instructions for a fast uncomplicated setup.
The BGP repository also contains Dockerfiles for individual containered deployment, if needed.

Native

The game can be built into a standalone JAR (all compile and runtime dependencies included):

mvn clean package -Pdev
java -jar target/xox.jar

Note: this option most likely requires adjustments in the dev properties file.

War

Alternatively the game can be built into a self contained Web ARchive

mvn clean package -Pwar

You can then deploy the war to a Tomcat application container.

Note: this option most likely requires adjustments in the war properties file.

Contact / Pull Requests

Contact information for bug reports and pull requests: