Game Control

Fetch Game, Start Game, Change Chapters while Goal Check Triggers, Resume with Memories

1. Get metadata of a specific game

retrieve the game basic information for preview

POST https://api.rpggo.ai/v2/open/game/gamemetadata

Request Body

Name
Type
Description

game_id

String

the unique id of the game

Sample Curl
curl --location 'https://api.rpggo.ai/v2/open/game/gamemetadata' \
--header 'accept: application/json' \
--header 'Authorization:$YOUR_RPGGO_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "game_id": "42d029a8-b5a7-49cb-94f4-8baefb0b898a"
}'
{
    "code": 0,
    "msg": "ok",
    "data": {
        "name": "๐Ÿ“’ BAC -Break the boundaries",
        "game_id": "42d029a8-b5a7-49cb-94f4-8baefb0b898a",
        "background": "",
        "intro": "In 2102, Terminus City has clear class divides, with Mega Corporation ruling. Rebels in the Wild Hope District challenge this after a drone crash.",
        "image": "https://storage.googleapis.com/rpggo-game/rpggo-creator/5c642a81-e09a-4349-b3a2-f00156479dff/9cc4b0a4-6bfa-489a-aee8-57217a2c5cfd",
        "genre": "published",
        "user_id": "",
        "moderation_level": "",
        "background_musics": null,
        "chapters": [
            {
                "name": "The Crash",
                "chapter_id": "da08c8ff-490e-4a7f-853c-c64d8c803b15",
                "background": "Prologue - Marco (you,Player), an underground street racer from the Wild Hope District, is born with a restless nature flowing in his blood, and his sister Chiara seems equally rebellious under his influence.\n\nChiara connected her consciousness to a drone and infiltrated Terminus, but unfortunately, the drone crashed midway. The accident caused severe neurological trauma to Chiara, and angry Marco swore to find the culprit.\n\nhint:\n(Ask each character who they are)\n(Ask each character what happened before and after the accident)\n(Ask each character if they helped Chiara)\n(Ask each character the cause of the accident)",
                "intro": "None",
                "image": "",
                "background_audio": "",
                "ending_audio": ""
            }
        ],
        "interaction": null,
        "created_at": "2024-03-13T04:53:43Z",
        "updated_at": "2024-04-25T04:41:56Z"
    }
}

2. Start the game

start the game at specific chapter. If chapter_id is not specified, then start from chapter 1.

POST https://api.rpggo.ai/v2/open/game/startgame

Request Body

Name
Type
Description

game_id

String

the unique id of the game

chapter_id

String

the unique id of the start chapter

session_id

String

the unique id to identify the play session. The API Caller need to maintian the session_id in its logic.

3. Switch chapter

switch the current chapter to other chapter.

POST https://api.rpggo.ai/v2/open/game/changechapter

Request Body

Name
Type
Description

game_id

String

the unique id of the game

chapter_id

String

the unique id of the start chapter

session_id

String

the unique id to identify the play session. The API Caller need to maintian the session_id in its logic.

4. Resume the game from a previous session

if user want to continue the playing from a previous session

POST https://api.rpggo.ai/v2/open/game/resumesession

Request Body

Name
Type
Description

game_id

String

the unique id of the game

session_id

String

the unique id to identify the play session. The API Caller need to maintian the session_id in its logic.

Last updated

Was this helpful?