Commit graph

90 commits

Author SHA1 Message Date
LevelX2
deb675a74a Xmage 1.4.30V0 2018-08-15 11:35:40 +02:00
LevelX2
a19c257e50 XMage 1.4.30V0 2018-05-27 01:28:42 +02:00
LevelX2
fe2220e19e Xmage 1.4.29V0 2018-04-19 21:07:14 +02:00
LevelX2
fed2d1a259 XMage 1.4.28V0 2018-03-10 20:42:29 +01:00
Shaun Hannah
6aeb3c7c3a [WIP] Consumable JSON game logs
As discussed in https://github.com/magefree/mage/issues/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"
}
```
2018-02-26 19:23:00 -05:00
LevelX2
40afa04b24 xmage 1.4.27V0 2018-01-13 22:54:53 +01:00
LevelX2
1fb24116ae xmage 1.4.26V0 2017-08-15 01:27:06 +02:00
LevelX2
fe2ee5dfec Xmage 1.4.25V0 2017-07-29 20:35:16 +02:00
LevelX2
7d911ae803 XMage 1.4.24V0 2017-07-08 16:33:09 +02:00
magenoxx
d73709bdbe Moved CardView to src/main/java 2017-05-13 18:55:54 +03:00
LevelX2
ef4cf90a0f Release 1.4.23V0 2017-04-17 10:53:59 +02:00
LevelX2
9d8a8a33f1 Xmage 1.4.22V0 2017-03-11 13:38:55 +01:00
Nathaniel Brandes
34ea9e53d0 Rev .pom Java version to fix compilation. 2017-03-07 22:31:30 -08:00
LevelX2
6625bf86be Xmage 1.4.21V0 2017-01-15 17:44:02 +01:00
LevelX2
ee203cf981 Xmage Release 1.4.20V0 2017-01-08 01:36:05 +01:00
LevelX2
b62ca1ed1f Xmage 1.4.19 2016-11-27 19:59:42 +01:00
LevelX2
c9e1b415e2 Xmage 1.4.18V0 2016-11-06 18:11:19 +01:00
LevelX2
8b62eece68 XMage 1.4.17V0 2016-10-23 10:03:01 +02:00
LevelX2
157827addc XMage 1.4.16v0 2016-10-08 11:14:13 +02:00
LevelX2
bb8326d46b XMage 1.4.15v0 2016-09-10 12:31:18 +02:00
LevelX2
539b03bd1d Xmage 1.4.14v0 2016-08-13 10:14:38 +02:00
LevelX2
d0ecb473da Xmage 1.4.13v0 2016-07-11 22:54:43 +02:00
LevelX2
266a0870ca Xmage 1.4.12v0 2016-05-29 10:59:39 +02:00
LevelX2
1fcd26fc60 xmage 1.4.11v0 2016-04-26 00:59:03 +02:00
LevelX2
bcdde0a945 XMage version 1.4.10v0 2016-04-06 22:56:02 +02:00
LevelX2
e9638bcc4d Release 1.4.9v0 2016-02-21 12:58:58 +01:00
LevelX2
5981816a4b Switch to 1.4.8 for upcoming realease. 2016-01-22 22:33:58 +01:00
LevelX2
121f40c019 Prepared 1.4.7. 2016-01-10 22:13:59 +01:00
LevelX2
207f486afc * Xmage 1.4.6v0 2015-12-13 19:47:04 +01:00
LevelX2
0d86e8e063 Xmage 1.4.5v0 2015-11-21 10:33:43 +01:00
LevelX2
9a37bd28ad Xmage 1.4.4v0 2015-09-05 12:51:07 +02:00
LevelX2
c98577cc6a Xmage 1.4.3v0 2015-08-06 22:18:01 +02:00
LevelX2
cd0cba6ec7 XMage Release 1.4.2v0 2015-07-04 01:28:19 +02:00
LevelX2
060a468d4b Update to release 1.4.1. 2015-06-14 02:43:16 +02:00
LevelX2
fa847e8feb * Update to version 1.4.0v0. 2015-05-12 23:11:25 +02:00
LevelX2
8c66667b7f * Some changes to pom files to use local repository for com\googlecode\jspf\jspf-core\0.9.1\. 2014-10-22 14:52:03 +02:00
LevelX2
a2fbd0bc4c Updated JBoss Remoting to newer version. 2014-08-22 15:06:48 +02:00
North
7f2a2ca0a3 removed dependency to trove4j (only used in DeckBuilder) 2014-04-05 21:55:35 +03:00
LevelX2
1f3687cc86 Switched to binary/source format java 1.7. 2014-02-18 17:35:32 +01:00
LevelX2
9c5d5208b9 Some updates to pom dependency. 2014-02-03 17:46:19 +01:00
LevelX2
ad71ec6aad Set Version 1.3.0. 2014-01-25 15:55:39 +01:00
LevelX2
d3ba92ed17 Updated version of jboss.remoting and jobiss-common-core. 2014-01-09 13:18:30 +01:00
LevelX2
d094f291aa Pushed version to 1.2.0dev. 2013-10-26 13:01:31 +02:00
LevelX2
7d0cf3cd8c Set version to 1.1.0 dev. 2013-07-21 22:52:25 +02:00
LevelX2
5336d4c0f9 Pushed version to 1.0.3 dev. 2013-05-12 16:00:25 +02:00
LevelX2
6b38cd5b18 Mage Version 1.0.2 2013-05-11 23:06:30 +02:00
magenoxx
97acebacdd Pumped version to 1.0.2.dev 2013-04-01 16:00:30 +04:00
LevelX2
aa0290fd32 Set Version to 1.0.1 2013-03-10 11:40:56 +01:00
magenoxx
5577d5b3a8 Changed version from 0.10.1 to 1.0.0 2013-02-26 14:11:00 +04:00
Loki
aa31ef23d3 bump version to 0.10.1 2012-12-28 12:48:26 +13:00