Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: consumable game logs and replays #4515

Open
hooptie45 opened this issue Feb 12, 2018 · 15 comments
Open

Feature: consumable game logs and replays #4515

hooptie45 opened this issue Feb 12, 2018 · 15 comments
Labels
enhancement refactoring Developers topics about code and programming

Comments

@hooptie45
Copy link
Contributor

There can be a wealth of knowledge derived from the game logs. Unfortunately it's not really in a form that is easily consumable. How much effort would it take to produce a log of all the game events as JSON? Also, would it be possible to have this log at both the client and server level?

My use case is applying this to machine learning, and using the past games as kind of a training set. But I'm sure there are other uses.

@JayDi85
Copy link
Member

JayDi85 commented Feb 13, 2018

Current game log is useless. XMage show up only user friendly events, not all.

XMage have two different data source:

  • Server side have game's states. GameState is full info about game at any moment -- that's what you need for AI;
  • Client side have game's views. GameView is like game's state, but contain only current player's data to visualize -- it's useless for AI (well... it's can, but will be difficult like black box learning: you can't see inner game state like current active effects or variables).

@hooptie45
Copy link
Contributor Author

Yeah I've poked around that GameState object from the debugger, I suspected that that was what I was looking for. If I recall correctly, we'd need to map the UUID references to the game's permanents, but that should be strait forward.

I'm kind of a newbie Java developer, but could we get a REST interface for the server that would would expose an endpoint to get all the current games being played, and an endpoint that for a given game UUID, return a json serialized version of the GameState?

And from the GameState, is it possible to know the details of each turn that was played up till that point? The entire GameState object might be overkill for this use case, just the basic information would be a great start.

@hooptie45
Copy link
Contributor Author

To avoid constantly hammering the xmage server, I think dumping this data to a log file, or kafka stream might be something worth considering. I'd be happy it provide that, via something like a webhook; which the xmage server could ping after each state change(like after each player interaction) with a JSON payload of the current game state. If that was in place, I could build the API to expose the data.

@emerald000
Copy link
Contributor

We shouldn't give access to GameState while a match is in progress. You could use it to see the opponent's hand and library.

@JayDi85
Copy link
Member

JayDi85 commented Feb 13, 2018

You can't send GameState data to outside -- it's a cheat and users can't see full game data. It can be implemented by special server mode to process and save full game histories. Look at "testMode" as example.

GameStates object can contain history. It's uses for rollback to previous states (by user request or by ability action). Can be found in GameImpl.java.

By theory you can inject your code to void resume() or void play(UUID nextPlayerId) to save current state history, write json-logs or upstream data to outside (e.g. AI bot can access to that data at any time by API request).

Same code can be used to implement game's replay system (history of GameView objects).

@spjspj
Copy link
Contributor

spjspj commented Feb 13, 2018

@emerald000 I was thinking about this (for a somewhat different reason). Implementing something similar to #3218 - but with extra information such as 'Player XYZ has priority' would be useful.

@hooptie45
Copy link
Contributor Author

The more I think about it, dumping the GameState data to a file during the resume phase would be the way to go. Then we're not exposing anything to the outside during the game.

A similar hook can be added to the end game phase, which would flag that game log as ready for consumption. A separate worker process could be in charge of processing and cleaning up the finished game logs. The idea is to make this as lightweight as possible, so it doesn't effect the game servers performance.

Thoughts?

@jdsiddon
Copy link

So the logs would only available for processing after the game is over?

@hooptie45
Copy link
Contributor Author

@jdsiddon That is correct. We'd be capturing the data as the game is in progress, but we'd defer releasing the data until after the game is finished.

@jdsiddon
Copy link

I think this would be a good idea.

@LevelX2
Copy link
Contributor

LevelX2 commented Feb 14, 2018

I guess to create a JSON log on the client side would be possible and useful as AI data base also as a base to automatically analyse games. It would only inlude the data that the client can see. And it wouldn't burden the server.

Looking in the future and be aware that this would create a lot of work:
The best way in my opinion would be to replace the current views that way too often transfer the complete state information (from the client view) by a serial protocol (e.g. JSON format) that only transfers the changes compared to the last transfered data or the action a player did. That would probably enormously reduce the transfered data and help to solve the network problems. For sure the client has to be able to request a complete state (e.g. for reconnecting or if something gets out of order).

@JayDi85
Copy link
Member

JayDi85 commented Feb 14, 2018

JSONL is good one for streaming and storage.

I like Russian Sberbank Holdem Challenge for AI last year with good docs and materials (but russian only). It's use JSON for data and streaming for poker game with AI -- game states, replays, streaming and AI. Same as XMage. You can find git repository here.

JSON streaming file example:
https://github.com/sberbank-ai/holdem-challenge/blob/master/simulator_stdin_example.jsonlines

@hooptie45
Copy link
Contributor Author

@LevelX2 - regarding the client side Json logs, I think that would be a viable alternative; provided that we include a hook submit the this log back to a central service upon game completion; for mass analysis. I'd be happy to provide that service and expose the data for all who are interested. We might wanna make that opt
Regarding the Json driven client; this is something we should absolutely do! I'd really love to see a web based interface to replace the Java client; and there is alot of good frameworks to make this possible (graphql subscriptions, or websockets). If you provide the API; I'd be very interested in helping build out the web-ui; and the GraphQL server. This should probably be a separate issue, as it will be a substantial amount of work; but I'd like to get the conversation started.

@hooptie45
Copy link
Contributor Author

@JayDi85 - that is a great find, and exactly what I was thinking we could do with xmage!

@LevelX2 LevelX2 added enhancement refactoring Developers topics about code and programming labels Feb 16, 2018
hooptie45 pushed a commit to hooptie45/mage that referenced this issue Feb 26, 2018
As discussed in magefree#4515

This exposes a JSON log of game interactions that can be analyzed.

This is just a first pass, to get up to speed with how the messaging works. It'd like to trim down the messages much
further so they don't include redundant information in each message. Also gson supports much more advances serialization
options; such as using the @expose annotation. We should probably use that, but I ran into some issues (I'm not a java
developer, so still learning).

TODO:
  These currently only exist on the client side; ideally we'd submit this logs back up to a central server after the
  games completion; thinking this could be simple via an S3 file drop, and a Lambda function to process and expose the
  logs; maybe via a kafka stream.

Examples of log messages are below:

```
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "GAME_SELECT",
  "value": {
    "gameView": {
      "priorityTime": 3000,
      "players": [
        {
          "name": "computer",
          "life": 20,
          "counters": {}
        },
        {
          "name": "hooptie",
          "life": 20,
          "counters": {}
        }
      ],
      "hand": {
        "425d774f-ee0c-4a9b-8516-c98f886943f0": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "425d774f-ee0c-4a9b-8516-c98f886943f0"
        },
        "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff": {
          "name": "Blade of the Bloodchief",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff"
        },
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806": {
          "name": "Ornithopter",
          "power": "0",
          "toughness": "2",
          "loyalty": "",
          "manaCost": [
            "{0}"
          ],
          "convertedManaCost": 0,
          "type": 0,
          "paid": false,
          "id": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
        },
        "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64"
        },
        "91239f4f-9003-4c48-8ca1-4c318f892489": {
          "name": "Cranial Plating",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "91239f4f-9003-4c48-8ca1-4c318f892489"
        },
        "feb268d8-0535-4a9c-8915-83dd92a08c4c": {
          "name": "Arcbound Ravager",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "feb268d8-0535-4a9c-8915-83dd92a08c4c"
        }
      },
      "canPlayInHand": [
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
      ],
      "stack": {},
      "combat": [],
      "phase": "PRECOMBAT_MAIN",
      "step": "PRECOMBAT_MAIN"
    },
    "message": "Play spells and abilities.",
    "options": {
      "queryType": "SELECT"
    }
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "SEND_PLAYER_UUID",
  "value": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "GAME_CHOOSE_PILE",
  "value": {
    "choices": {
      "1ecf8671-be4c-4060-a76b-af614235a5b7": "Cast Ornithopter"
    }
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-3v2cj2-je43178o-1-je43179f-4",
  "type": "GAME_INIT",
  "value": {
    "priorityTime": 3000,
    "players": [
      {
        "name": "computer",
        "life": 20,
        "counters": {}
      },
      {
        "name": "hooptie",
        "life": 20,
        "counters": {}
      }
    ],
    "hand": {
      "425d774f-ee0c-4a9b-8516-c98f886943f0": {
        "name": "Springleaf Drum",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{1}"
        ],
        "convertedManaCost": 1,
        "type": 0,
        "paid": false,
        "id": "425d774f-ee0c-4a9b-8516-c98f886943f0"
      },
      "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff": {
        "name": "Blade of the Bloodchief",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{1}"
        ],
        "convertedManaCost": 1,
        "type": 0,
        "paid": false,
        "id": "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff"
      },
      "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806": {
        "name": "Ornithopter",
        "power": "0",
        "toughness": "2",
        "loyalty": "",
        "manaCost": [
          "{0}"
        ],
        "convertedManaCost": 0,
        "type": 0,
        "paid": false,
        "id": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
      },
      "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64": {
        "name": "Springleaf Drum",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{1}"
        ],
        "convertedManaCost": 1,
        "type": 0,
        "paid": false,
        "id": "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64"
      },
      "91239f4f-9003-4c48-8ca1-4c318f892489": {
        "name": "Cranial Plating",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{2}"
        ],
        "convertedManaCost": 2,
        "type": 0,
        "paid": false,
        "id": "91239f4f-9003-4c48-8ca1-4c318f892489"
      },
      "feb268d8-0535-4a9c-8915-83dd92a08c4c": {
        "name": "Arcbound Ravager",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{2}"
        ],
        "convertedManaCost": 2,
        "type": 0,
        "paid": false,
        "id": "feb268d8-0535-4a9c-8915-83dd92a08c4c"
      }
    },
    "canPlayInHand": [
      "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
    ],
    "stack": {},
    "combat": [],
    "phase": "PRECOMBAT_MAIN",
    "step": "PRECOMBAT_MAIN"
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-3v2cj2-je43178o-1-je43179f-4",
  "type": "GAME_SELECT",
  "value": {
    "gameView": {
      "priorityTime": 3000,
      "players": [
        {
          "name": "computer",
          "life": 20,
          "counters": {}
        },
        {
          "name": "hooptie",
          "life": 20,
          "counters": {}
        }
      ],
      "hand": {
        "425d774f-ee0c-4a9b-8516-c98f886943f0": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "425d774f-ee0c-4a9b-8516-c98f886943f0"
        },
        "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff": {
          "name": "Blade of the Bloodchief",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff"
        },
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806": {
          "name": "Ornithopter",
          "power": "0",
          "toughness": "2",
          "loyalty": "",
          "manaCost": [
            "{0}"
          ],
          "convertedManaCost": 0,
          "type": 0,
          "paid": false,
          "id": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
        },
        "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64"
        },
        "91239f4f-9003-4c48-8ca1-4c318f892489": {
          "name": "Cranial Plating",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "91239f4f-9003-4c48-8ca1-4c318f892489"
        },
        "feb268d8-0535-4a9c-8915-83dd92a08c4c": {
          "name": "Arcbound Ravager",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "feb268d8-0535-4a9c-8915-83dd92a08c4c"
        }
      },
      "canPlayInHand": [
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
      ],
      "stack": {},
      "combat": [],
      "phase": "PRECOMBAT_MAIN",
      "step": "PRECOMBAT_MAIN"
    },
    "message": "Play spells and abilities.",
    "options": {
      "queryType": "SELECT"
    }
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "SEND_PLAYER_UUID",
  "value": "1ecf8671-be4c-4060-a76b-af614235a5b7"
}
```
hooptie45 pushed a commit to hooptie45/mage that referenced this issue Feb 26, 2018
As discussed in magefree#4515

This exposes a JSON log of game interactions that can be analyzed.

This is just a first pass, to get up to speed with how the messaging works. It'd like to trim down the messages much
further so they don't include redundant information in each message. Also gson supports much more advances serialization
options; such as using the @expose annotation. We should probably use that, but I ran into some issues (I'm not a java
developer, so still learning).

TODO:
  These currently only exist on the client side; ideally we'd submit this logs back up to a central server after the
  games completion; thinking this could be simple via an S3 file drop, and a Lambda function to process and expose the
  logs; maybe via a kafka stream.

Examples of log messages are below:

```
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "GAME_SELECT",
  "value": {
    "gameView": {
      "priorityTime": 3000,
      "players": [
        {
          "name": "computer",
          "life": 20,
          "counters": {}
        },
        {
          "name": "hooptie",
          "life": 20,
          "counters": {}
        }
      ],
      "hand": {
        "425d774f-ee0c-4a9b-8516-c98f886943f0": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "425d774f-ee0c-4a9b-8516-c98f886943f0"
        },
        "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff": {
          "name": "Blade of the Bloodchief",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff"
        },
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806": {
          "name": "Ornithopter",
          "power": "0",
          "toughness": "2",
          "loyalty": "",
          "manaCost": [
            "{0}"
          ],
          "convertedManaCost": 0,
          "type": 0,
          "paid": false,
          "id": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
        },
        "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64"
        },
        "91239f4f-9003-4c48-8ca1-4c318f892489": {
          "name": "Cranial Plating",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "91239f4f-9003-4c48-8ca1-4c318f892489"
        },
        "feb268d8-0535-4a9c-8915-83dd92a08c4c": {
          "name": "Arcbound Ravager",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "feb268d8-0535-4a9c-8915-83dd92a08c4c"
        }
      },
      "canPlayInHand": [
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
      ],
      "stack": {},
      "combat": [],
      "phase": "PRECOMBAT_MAIN",
      "step": "PRECOMBAT_MAIN"
    },
    "message": "Play spells and abilities.",
    "options": {
      "queryType": "SELECT"
    }
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "SEND_PLAYER_UUID",
  "value": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "GAME_CHOOSE_PILE",
  "value": {
    "choices": {
      "1ecf8671-be4c-4060-a76b-af614235a5b7": "Cast Ornithopter"
    }
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-3v2cj2-je43178o-1-je43179f-4",
  "type": "GAME_INIT",
  "value": {
    "priorityTime": 3000,
    "players": [
      {
        "name": "computer",
        "life": 20,
        "counters": {}
      },
      {
        "name": "hooptie",
        "life": 20,
        "counters": {}
      }
    ],
    "hand": {
      "425d774f-ee0c-4a9b-8516-c98f886943f0": {
        "name": "Springleaf Drum",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{1}"
        ],
        "convertedManaCost": 1,
        "type": 0,
        "paid": false,
        "id": "425d774f-ee0c-4a9b-8516-c98f886943f0"
      },
      "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff": {
        "name": "Blade of the Bloodchief",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{1}"
        ],
        "convertedManaCost": 1,
        "type": 0,
        "paid": false,
        "id": "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff"
      },
      "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806": {
        "name": "Ornithopter",
        "power": "0",
        "toughness": "2",
        "loyalty": "",
        "manaCost": [
          "{0}"
        ],
        "convertedManaCost": 0,
        "type": 0,
        "paid": false,
        "id": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
      },
      "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64": {
        "name": "Springleaf Drum",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{1}"
        ],
        "convertedManaCost": 1,
        "type": 0,
        "paid": false,
        "id": "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64"
      },
      "91239f4f-9003-4c48-8ca1-4c318f892489": {
        "name": "Cranial Plating",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{2}"
        ],
        "convertedManaCost": 2,
        "type": 0,
        "paid": false,
        "id": "91239f4f-9003-4c48-8ca1-4c318f892489"
      },
      "feb268d8-0535-4a9c-8915-83dd92a08c4c": {
        "name": "Arcbound Ravager",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{2}"
        ],
        "convertedManaCost": 2,
        "type": 0,
        "paid": false,
        "id": "feb268d8-0535-4a9c-8915-83dd92a08c4c"
      }
    },
    "canPlayInHand": [
      "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
    ],
    "stack": {},
    "combat": [],
    "phase": "PRECOMBAT_MAIN",
    "step": "PRECOMBAT_MAIN"
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-3v2cj2-je43178o-1-je43179f-4",
  "type": "GAME_SELECT",
  "value": {
    "gameView": {
      "priorityTime": 3000,
      "players": [
        {
          "name": "computer",
          "life": 20,
          "counters": {}
        },
        {
          "name": "hooptie",
          "life": 20,
          "counters": {}
        }
      ],
      "hand": {
        "425d774f-ee0c-4a9b-8516-c98f886943f0": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "425d774f-ee0c-4a9b-8516-c98f886943f0"
        },
        "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff": {
          "name": "Blade of the Bloodchief",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff"
        },
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806": {
          "name": "Ornithopter",
          "power": "0",
          "toughness": "2",
          "loyalty": "",
          "manaCost": [
            "{0}"
          ],
          "convertedManaCost": 0,
          "type": 0,
          "paid": false,
          "id": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
        },
        "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64"
        },
        "91239f4f-9003-4c48-8ca1-4c318f892489": {
          "name": "Cranial Plating",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "91239f4f-9003-4c48-8ca1-4c318f892489"
        },
        "feb268d8-0535-4a9c-8915-83dd92a08c4c": {
          "name": "Arcbound Ravager",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "feb268d8-0535-4a9c-8915-83dd92a08c4c"
        }
      },
      "canPlayInHand": [
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
      ],
      "stack": {},
      "combat": [],
      "phase": "PRECOMBAT_MAIN",
      "step": "PRECOMBAT_MAIN"
    },
    "message": "Play spells and abilities.",
    "options": {
      "queryType": "SELECT"
    }
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "SEND_PLAYER_UUID",
  "value": "1ecf8671-be4c-4060-a76b-af614235a5b7"
}
```
hooptie45 pushed a commit to hooptie45/mage that referenced this issue Feb 26, 2018
As discussed in magefree#4515

This exposes a JSON log of game interactions that can be analyzed.

This is just a first pass, to get up to speed with how the messaging works. It'd like to trim down the messages much
further so they don't include redundant information in each message. Also gson supports much more advances serialization
options; such as using the @expose annotation. We should probably use that, but I ran into some issues (I'm not a java
developer, so still learning).

TODO:
  These currently only exist on the client side; ideally we'd submit this logs back up to a central server after the
  games completion; thinking this could be simple via an S3 file drop, and a Lambda function to process and expose the
  logs; maybe via a kafka stream.

Examples of log messages are below:

```
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "GAME_SELECT",
  "value": {
    "gameView": {
      "priorityTime": 3000,
      "players": [
        {
          "name": "computer",
          "life": 20,
          "counters": {}
        },
        {
          "name": "hooptie",
          "life": 20,
          "counters": {}
        }
      ],
      "hand": {
        "425d774f-ee0c-4a9b-8516-c98f886943f0": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "425d774f-ee0c-4a9b-8516-c98f886943f0"
        },
        "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff": {
          "name": "Blade of the Bloodchief",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff"
        },
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806": {
          "name": "Ornithopter",
          "power": "0",
          "toughness": "2",
          "loyalty": "",
          "manaCost": [
            "{0}"
          ],
          "convertedManaCost": 0,
          "type": 0,
          "paid": false,
          "id": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
        },
        "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64"
        },
        "91239f4f-9003-4c48-8ca1-4c318f892489": {
          "name": "Cranial Plating",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "91239f4f-9003-4c48-8ca1-4c318f892489"
        },
        "feb268d8-0535-4a9c-8915-83dd92a08c4c": {
          "name": "Arcbound Ravager",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "feb268d8-0535-4a9c-8915-83dd92a08c4c"
        }
      },
      "canPlayInHand": [
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
      ],
      "stack": {},
      "combat": [],
      "phase": "PRECOMBAT_MAIN",
      "step": "PRECOMBAT_MAIN"
    },
    "message": "Play spells and abilities.",
    "options": {
      "queryType": "SELECT"
    }
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "SEND_PLAYER_UUID",
  "value": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "GAME_CHOOSE_PILE",
  "value": {
    "choices": {
      "1ecf8671-be4c-4060-a76b-af614235a5b7": "Cast Ornithopter"
    }
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-3v2cj2-je43178o-1-je43179f-4",
  "type": "GAME_INIT",
  "value": {
    "priorityTime": 3000,
    "players": [
      {
        "name": "computer",
        "life": 20,
        "counters": {}
      },
      {
        "name": "hooptie",
        "life": 20,
        "counters": {}
      }
    ],
    "hand": {
      "425d774f-ee0c-4a9b-8516-c98f886943f0": {
        "name": "Springleaf Drum",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{1}"
        ],
        "convertedManaCost": 1,
        "type": 0,
        "paid": false,
        "id": "425d774f-ee0c-4a9b-8516-c98f886943f0"
      },
      "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff": {
        "name": "Blade of the Bloodchief",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{1}"
        ],
        "convertedManaCost": 1,
        "type": 0,
        "paid": false,
        "id": "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff"
      },
      "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806": {
        "name": "Ornithopter",
        "power": "0",
        "toughness": "2",
        "loyalty": "",
        "manaCost": [
          "{0}"
        ],
        "convertedManaCost": 0,
        "type": 0,
        "paid": false,
        "id": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
      },
      "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64": {
        "name": "Springleaf Drum",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{1}"
        ],
        "convertedManaCost": 1,
        "type": 0,
        "paid": false,
        "id": "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64"
      },
      "91239f4f-9003-4c48-8ca1-4c318f892489": {
        "name": "Cranial Plating",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{2}"
        ],
        "convertedManaCost": 2,
        "type": 0,
        "paid": false,
        "id": "91239f4f-9003-4c48-8ca1-4c318f892489"
      },
      "feb268d8-0535-4a9c-8915-83dd92a08c4c": {
        "name": "Arcbound Ravager",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{2}"
        ],
        "convertedManaCost": 2,
        "type": 0,
        "paid": false,
        "id": "feb268d8-0535-4a9c-8915-83dd92a08c4c"
      }
    },
    "canPlayInHand": [
      "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
    ],
    "stack": {},
    "combat": [],
    "phase": "PRECOMBAT_MAIN",
    "step": "PRECOMBAT_MAIN"
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-3v2cj2-je43178o-1-je43179f-4",
  "type": "GAME_SELECT",
  "value": {
    "gameView": {
      "priorityTime": 3000,
      "players": [
        {
          "name": "computer",
          "life": 20,
          "counters": {}
        },
        {
          "name": "hooptie",
          "life": 20,
          "counters": {}
        }
      ],
      "hand": {
        "425d774f-ee0c-4a9b-8516-c98f886943f0": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "425d774f-ee0c-4a9b-8516-c98f886943f0"
        },
        "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff": {
          "name": "Blade of the Bloodchief",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff"
        },
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806": {
          "name": "Ornithopter",
          "power": "0",
          "toughness": "2",
          "loyalty": "",
          "manaCost": [
            "{0}"
          ],
          "convertedManaCost": 0,
          "type": 0,
          "paid": false,
          "id": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
        },
        "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64"
        },
        "91239f4f-9003-4c48-8ca1-4c318f892489": {
          "name": "Cranial Plating",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "91239f4f-9003-4c48-8ca1-4c318f892489"
        },
        "feb268d8-0535-4a9c-8915-83dd92a08c4c": {
          "name": "Arcbound Ravager",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "feb268d8-0535-4a9c-8915-83dd92a08c4c"
        }
      },
      "canPlayInHand": [
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
      ],
      "stack": {},
      "combat": [],
      "phase": "PRECOMBAT_MAIN",
      "step": "PRECOMBAT_MAIN"
    },
    "message": "Play spells and abilities.",
    "options": {
      "queryType": "SELECT"
    }
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "SEND_PLAYER_UUID",
  "value": "1ecf8671-be4c-4060-a76b-af614235a5b7"
}
```
hooptie45 pushed a commit to hooptie45/mage that referenced this issue Feb 27, 2018
As discussed in magefree#4515

This exposes a JSON log of game interactions that can be analyzed.

This is just a first pass, to get up to speed with how the messaging works. It'd like to trim down the messages much
further so they don't include redundant information in each message. Also gson supports much more advances serialization
options; such as using the @expose annotation. We should probably use that, but I ran into some issues (I'm not a java
developer, so still learning).

TODO:
  These currently only exist on the client side; ideally we'd submit this logs back up to a central server after the
  games completion; thinking this could be simple via an S3 file drop, and a Lambda function to process and expose the
  logs; maybe via a kafka stream.

Examples of log messages are below:

```
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "GAME_SELECT",
  "value": {
    "gameView": {
      "priorityTime": 3000,
      "players": [
        {
          "name": "computer",
          "life": 20,
          "counters": {}
        },
        {
          "name": "hooptie",
          "life": 20,
          "counters": {}
        }
      ],
      "hand": {
        "425d774f-ee0c-4a9b-8516-c98f886943f0": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "425d774f-ee0c-4a9b-8516-c98f886943f0"
        },
        "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff": {
          "name": "Blade of the Bloodchief",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff"
        },
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806": {
          "name": "Ornithopter",
          "power": "0",
          "toughness": "2",
          "loyalty": "",
          "manaCost": [
            "{0}"
          ],
          "convertedManaCost": 0,
          "type": 0,
          "paid": false,
          "id": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
        },
        "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64"
        },
        "91239f4f-9003-4c48-8ca1-4c318f892489": {
          "name": "Cranial Plating",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "91239f4f-9003-4c48-8ca1-4c318f892489"
        },
        "feb268d8-0535-4a9c-8915-83dd92a08c4c": {
          "name": "Arcbound Ravager",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "feb268d8-0535-4a9c-8915-83dd92a08c4c"
        }
      },
      "canPlayInHand": [
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
      ],
      "stack": {},
      "combat": [],
      "phase": "PRECOMBAT_MAIN",
      "step": "PRECOMBAT_MAIN"
    },
    "message": "Play spells and abilities.",
    "options": {
      "queryType": "SELECT"
    }
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "SEND_PLAYER_UUID",
  "value": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "GAME_CHOOSE_PILE",
  "value": {
    "choices": {
      "1ecf8671-be4c-4060-a76b-af614235a5b7": "Cast Ornithopter"
    }
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-3v2cj2-je43178o-1-je43179f-4",
  "type": "GAME_INIT",
  "value": {
    "priorityTime": 3000,
    "players": [
      {
        "name": "computer",
        "life": 20,
        "counters": {}
      },
      {
        "name": "hooptie",
        "life": 20,
        "counters": {}
      }
    ],
    "hand": {
      "425d774f-ee0c-4a9b-8516-c98f886943f0": {
        "name": "Springleaf Drum",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{1}"
        ],
        "convertedManaCost": 1,
        "type": 0,
        "paid": false,
        "id": "425d774f-ee0c-4a9b-8516-c98f886943f0"
      },
      "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff": {
        "name": "Blade of the Bloodchief",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{1}"
        ],
        "convertedManaCost": 1,
        "type": 0,
        "paid": false,
        "id": "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff"
      },
      "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806": {
        "name": "Ornithopter",
        "power": "0",
        "toughness": "2",
        "loyalty": "",
        "manaCost": [
          "{0}"
        ],
        "convertedManaCost": 0,
        "type": 0,
        "paid": false,
        "id": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
      },
      "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64": {
        "name": "Springleaf Drum",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{1}"
        ],
        "convertedManaCost": 1,
        "type": 0,
        "paid": false,
        "id": "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64"
      },
      "91239f4f-9003-4c48-8ca1-4c318f892489": {
        "name": "Cranial Plating",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{2}"
        ],
        "convertedManaCost": 2,
        "type": 0,
        "paid": false,
        "id": "91239f4f-9003-4c48-8ca1-4c318f892489"
      },
      "feb268d8-0535-4a9c-8915-83dd92a08c4c": {
        "name": "Arcbound Ravager",
        "power": "0",
        "toughness": "0",
        "loyalty": "",
        "manaCost": [
          "{2}"
        ],
        "convertedManaCost": 2,
        "type": 0,
        "paid": false,
        "id": "feb268d8-0535-4a9c-8915-83dd92a08c4c"
      }
    },
    "canPlayInHand": [
      "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
    ],
    "stack": {},
    "combat": [],
    "phase": "PRECOMBAT_MAIN",
    "step": "PRECOMBAT_MAIN"
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-3v2cj2-je43178o-1-je43179f-4",
  "type": "GAME_SELECT",
  "value": {
    "gameView": {
      "priorityTime": 3000,
      "players": [
        {
          "name": "computer",
          "life": 20,
          "counters": {}
        },
        {
          "name": "hooptie",
          "life": 20,
          "counters": {}
        }
      ],
      "hand": {
        "425d774f-ee0c-4a9b-8516-c98f886943f0": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "425d774f-ee0c-4a9b-8516-c98f886943f0"
        },
        "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff": {
          "name": "Blade of the Bloodchief",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "dd41bb4b-7fc3-4a3c-a69c-d18e281a1bff"
        },
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806": {
          "name": "Ornithopter",
          "power": "0",
          "toughness": "2",
          "loyalty": "",
          "manaCost": [
            "{0}"
          ],
          "convertedManaCost": 0,
          "type": 0,
          "paid": false,
          "id": "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
        },
        "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64": {
          "name": "Springleaf Drum",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{1}"
          ],
          "convertedManaCost": 1,
          "type": 0,
          "paid": false,
          "id": "a2f9cc13-e71a-4c9c-96aa-5424ea1a6b64"
        },
        "91239f4f-9003-4c48-8ca1-4c318f892489": {
          "name": "Cranial Plating",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "91239f4f-9003-4c48-8ca1-4c318f892489"
        },
        "feb268d8-0535-4a9c-8915-83dd92a08c4c": {
          "name": "Arcbound Ravager",
          "power": "0",
          "toughness": "0",
          "loyalty": "",
          "manaCost": [
            "{2}"
          ],
          "convertedManaCost": 2,
          "type": 0,
          "paid": false,
          "id": "feb268d8-0535-4a9c-8915-83dd92a08c4c"
        }
      },
      "canPlayInHand": [
        "06eb0a6c-1e70-4dc0-bd1c-93b6ea444806"
      ],
      "stack": {},
      "combat": [],
      "phase": "PRECOMBAT_MAIN",
      "step": "PRECOMBAT_MAIN"
    },
    "message": "Play spells and abilities.",
    "options": {
      "queryType": "SELECT"
    }
  }
}
{
  "gameId": "2cede8c5-ff8e-4f8c-b9ac-66af53c0a254",
  "sessionId": "5c4o149-678483-je42ycva-1-je42ycw2-4",
  "type": "SEND_PLAYER_UUID",
  "value": "1ecf8671-be4c-4060-a76b-af614235a5b7"
}
```
@JayDi85
Copy link
Member

JayDi85 commented Jan 4, 2019

MTGA example (current open beta saved full game logs and input-output json-messages):

  • income messages for users interactions (e.g. cards mouse hover), json example;
  • income messages for different state changes (e.g. available actions, new items, animations and etc), json example 1, json example 2 with cards descriptions;
  • it's contains only minimal info like action types and objects id (no descriptions, not dialogs, no texts);
  • all messages have incremental numbers (one number = one game state changes).

This was referenced Jul 29, 2020
@JayDi85 JayDi85 changed the title Feature: Support for consumable game logs Feature: Support for consumable game logs and replays Jul 29, 2020
@JayDi85 JayDi85 changed the title Feature: Support for consumable game logs and replays Feature: consumable game logs and replays Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement refactoring Developers topics about code and programming
Projects
None yet
Development

No branches or pull requests

6 participants