~subsetpark/tamerlane

A decentralized architecture for playing card games.

8fc382a Format all

8 days ago

8fc382a Format all

8 days ago

#Tamerlane

This project provides a decentralized HTTP callback-based architecture for playing card games.

It consists of two types of component:

  • a central server (this repo), which holds all game and player state, and which serves user interactions via javascript and websockets;
  • multiple game rules implementations, each of which implement the same set of endpoints and request format.

Games are configured by installing games on the central server as plugins, specifying a callback URL in the plugin config. From that point, users may begin a session of that game on the server, and the server will make calls to its configured URL whenever it needs to update game state.

In this way, developers can easily develop new games, using whatever technologies they like, as long as they can run a simple webserver. The process of implementing a new game is also reduced to simply articulating the rules, rather than having to maintain state or expose any user interaction.

#API format

#init()

#next()

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Install Node.js dependencies with npm install inside the assets directory
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

#Learn more