2-Player engine
Ludo 2-player (Blue vs Green)
A high-performance two-player board logic system. Built for competitive Blue vs Green matches with optimized movement paths and sub-millisecond turn validation.
Endpoint: Create match
Initialize a new 1v1 match. This endpoint deducts the match price from your balance and generates unique entry URLs for both players.
POST
https://games.tzsmm.com/api/ludo-bg/create
Authentication
| api_key | String | Required |
Match Configuration
| match_title | String | Optional - Lobby name |
| callback_url | URL | Post-game results webhook |
| win_url | URL | Redirect after victory |
| lose_url | URL | Redirect after defeat |
| home_url | URL | "Back to Home" link |
Player Details (Optional)
| blue_name | Display name for P1 |
| blue_logo | Avatar URL for P1 |
| green_name | Display name for P2 |
| green_logo | Avatar URL for P2 |
Creation response
{
"status": true,
"game_id": 102,
"blue_id": 405,
"blue_key": "LBGblue102...",
"blue_url": "https://ludo.tzsmm.com/ludo-bg/join/102/LBGblue...",
"green_id": 406,
"green_key": "LBGgreen102...",
"green_url": "https://ludo.tzsmm.com/ludo-bg/join/102/LBGgreen..."
}
Error: {"status": false, "message": "Insufficient Balance"}
Error: {"status": false, "message": "Invalid API key"}
Endpoint: Verify status
Fetch the authoritative state and winner details for any 2-player independent match. Use this for polling or manual reconciliation.
POST
https://games.tzsmm.com/api/ludo-bg/status
| api_key | Required |
| game_id | Required |
Status response
{
"status": true,
"game_id": 102,
"game_status": "finished",
"winner_id": 405,
"players": [
{
"color": "blue",
"name": "P1",
"logo": "...",
"lives": 3,
"player_status": "winner"
},
{
"color": "green",
"name": "P2",
"logo": null,
"lives": 0,
"player_status": "eliminated"
}
]
}
Server-to-Server Webhook
If callback_url is provided during creation, our engine will POST the final match results immediately upon completion.
Callback Payload
{
"game_id": 102,
"status": "finished",
"winner_id": 405,
"results": [
{ "player_id": 405, "color": "blue", "name": "UserA", "status": "winner", "rank": 1 },
{ "player_id": 406, "color": "green", "name": "UserB", "status": "eliminated", "rank": null }
]
}