From 5c24a08cc64da0987e18e5ef941e05c135298cf2 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sun, 17 May 2020 15:48:49 -0700 Subject: [PATCH] Add a new protocol description for the new LMNO API This exists above the level of any specific game implementation (such as empires) and handles the allocation of unique IDs for games and also allows for a namespace in which the API of games below are mounted. --- lmno.txt | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 lmno.txt diff --git a/lmno.txt b/lmno.txt new file mode 100644 index 0000000..3caa236 --- /dev/null +++ b/lmno.txt @@ -0,0 +1,78 @@ +Web interface for lmno.games server +=================================== +https://lmno.games/* +-------------------- +Serves static content (if file exists in filesystem), +otherwise proxies to dynamic server. + +https://lmno.games/ +------------------ +Type: Static + +Form: "Join game: (ID)" + + Dynamic lookup + Redirects to https://lmno.games/// + For example: https://lmno.games/empires/WXYZ/ + +Links: Host a new game: + + "Empires" links to https://lmno.games/empires + + "Other game" links to https://lmno.games/other_game + + etc. + +https://lmno.games/WXYZ/ +------------------------ +Type: Dynamic + + Redirects to https://lmno.games//WXYZ/ + +https//lmno.games/new/ (POST) +------------------------------------- +Type: Dynamic + +Creates a new, unique game ID and returns it as a JSON string + + Returns: "WXYZ" + +https://lmno.games/empires +-------------------------- +Type: Static + +Form: Start a new game + + Sends POST to https://lmno.games/new/empires + Receives game ID as a JSON string (for example, "WXYZ") + +https://lmno.games/empires/WXYZ?flavor=flutter +---------------------------------------------- +Type: Dynamic (to lookup game ID), but otherwise a static result + +Serves game content (either the default or the "flutter" flavor) + +Buttons, forms, etc.: + + https://lmno.games/WXYZ/empires/register (form action="/empires/register") + https://lmno.games/WXYZ/empires/events + etc. + +Native mobile client +==================== +Join game (ID): + + Client saves game ID (WXYZ, say) + +Client queries game state + + https://lmno.games/WXYZ/empires/players + +Client posts game updates: + + https://lmno.games/WXYZ/empires/register + etc. + +New game: + + https://lmno.games/ -- 2.43.0