Code Monkey home page Code Monkey logo

game's Introduction

Game

This project includes a framework and some implementations for running a game server.

  • Core framework: interfaces Game (definition of a game), Player (definition of a player), PlayerConfiguration (definitions for multiple players) and GameManager (allows running games with players).
  • Tic Tac Toe Example game implementation. Game for two players that place O or X alternatively on a 3x3 board.
  • Tai Pan Example game implementation. Trick-taking card game for four players playing in two teams.
  • Server The web service that is the backend for playing games.

Getting started

Build the project with ./gradlew build. This will also run the tests.

Run the tests with ./gradlew test.

Features

  • Fully reactive (Kotlin Coroutines) game library
  • Run a game with a player composition
  • Basic implementation for TicTacToe game
  • Basic implementation for Tai Pan game
  • Basic implementation of a game server that users can interact with

Future (not yet implemented)

  • Add backend web service to play games

    • Spring WebFlux with Coroutine support
    • No authentication or authorization, URLs should be short lived and unguessable, UUIDs.
    • A maximum number of active games.
    • APIs:
      • List of available games
      • For a game:
        • Open games
        • Create a new game
      • For a started game with enough players:
        • Current game state (subscription query, SSE?)
        • Player specific game state (subscription query, SSE?)
  • Add frontend to allow users to play games.

    • URLs:
      • / Homepage, list of games
      • /{game} Homepage of a game, active games, games waiting for players, button to join existing game or set up new game.
      • /{game}/{gameId}/join Join an existing game, redirect to player page.
      • /{game}/{gameId}/{playerId} The page specific page where the game can be played
  • Improve Game library

    • Games should manage some kind of state (game state and player specific state), and be more event driven internally, instead of imperative.
  • CLI interface for playing games

Publishing

Publish the application as a Docker image to Heroku with

./gradlew jib --image registry.heroku.com/hiddewie-game/web

Releasing

Release the pushed version with

heroku container:release --app hiddewie-game web

game's People

Contributors

hiddewie avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.