Multiplayer engine

Ludo logic unit

The professional standard for Ludo board logic. Handles 2-4 player sessions, real-time board state, and automated rule enforcement.

Endpoint: Create match

POST https://games.tzsmm.com/api/create-ludo-game

Mandatory parameters

api_keyStringRequired

Config parameters

match_titleStringTournament or lobby name
modeString"multi-winner" (default) or "single-winner"
callback_urlURLWebhook for game results
win_urlURLCustom redirection for winner
lose_urlURLCustom redirection for loser

Participant parameters (optional)

red_nameStringDisplay name for Red
red_logoURLAvatar image for Red
yellow_nameStringDisplay name for Yellow
yellow_logoURLAvatar image for Yellow
green_nameStringDisplay name for Green
green_logoURLAvatar image for Green
blue_nameStringDisplay name for Blue
blue_logoURLAvatar image for Blue

Exhaustive response JSON

{
  "status": true,
  "message": "Ludo Game Created Successfully",
  "game_id": 102,
  "red_id": 405, "red_key": "Lred...", "red_url": "...",
  "yellow_id": 406, "yellow_key": "Lyellow...", "yellow_url": "...",
  "green_id": 407, "green_key": "Lgreen...", "green_url": "...",
  "blue_id": 408, "blue_key": "Lblue...", "blue_url": "..."
}

Verify match status

Query the real-time state of any match to verify results or current progress. Use this if your callback fails or for manual verification.

POST https://games.tzsmm.com/api/ludo-game/status
api_keyStringRequired
game_idNumberRequired

Status response

{
  "status": true,
  "game_id": 102,
  "game_status": "finished",
  "winner_id": 405, 
  "winner_color": "red",
  "players": [
     { "color": "red", "name": "Dev01", "logo": "...", "lives": 3 },
     { "color": "yellow", "name": "BotY", "logo": "...", "lives": 0 },
     { "color": "green", "name": "BotG", "logo": "...", "lives": 3 },
     { "color": "blue", "name": "P04", "logo": "...", "lives": 1 }
  ]
}

Backend callback (server-to-server)

The Ludo engine triggers a results payload containing the ranks and logic finalization for all four positions.

Payload specification
{
  "game_id": 102,
  "status": "finished",
  "winner_id": 405,
  "results": [
    { "player_id": 405, "color": "red", "name": "Dev01", "rank": 1 },
    { "player_id": 406, "color": "yellow", "name": "YellowBot", "rank": null },
    { "player_id": 407, "color": "green", "name": "P3", "rank": null },
    { "player_id": 408, "color": "blue", "name": "P4", "rank": null }
  ]
}