Independent Engine

Knife Hit logic

High-precision arcade game engine. Supports skill-based challenges with sub-millisecond hit validation and score serialization.

Endpoint: Authorize Session

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

Mandatory Parameters

api_keyStringRequired

Optional Integration Parameters

match_titleStringCustom challenge title
player_1_nameStringDisplay name for P1
player_1_logoURLAvatar URL for P1
player_2_nameStringDisplay name for P2
player_2_logoURLAvatar URL for P2
callback_urlURLWebhook for score result
win_urlURLFinal leaderboard redirection
lose_urlURLCustom redirection for loser
home_urlURLExit redirection URL
end_timeDateSession expiration (ISO format)

Real Response JSON

{
  "status": true,
  "game_id": "Wxyz...",
  "player_1_id": "P-UUID-1",
  "player_2_id": "P-UUID-2",
  "player_1_url": "https://games.tzsmm.com/knife-game/join/Wxyz/P1",
  "player_2_url": "https://games.tzsmm.com/knife-game/join/Wxyz/P2"
}

Verify match status

Instantly verify the status and winners of any Arcade session. Recommended for double-checking final scores and session integrity.

POST https://games.tzsmm.com/api/knife-game/status
api_keyStringRequired
game_idStringRequired

Status response

{
  "status": true,
  "game_id": "Wxyz...",
  "game_status": "finished",
  "winner": "P-UUID-1", 
  "message": "Game details fetched",
  "players": [
     { "id": "P1", "name": "Dev01", "logo": "...", "score": 1050, "status": "winner" }
  ]
}

Outcome Callback

The Arcade engine posts the final winner results once the game completes (either by target finish or inactivity).

Payload Specification
{
  "game_id": "Wxyz...",
  "state": "finished",
  "winner": "P-UUID-1"
}

Code execution (Axios)

Node.js Integration
const response = await axios.post('https://games.tzsmm.com/api/knife-create-game', {
    api_key: 'YOUR_API_KEY',
    callback_url: 'https://yoursite.com/hook'
});

console.log(response.data.game_id);