Skip to content

Socket Messages

KevinSnyderCodes edited this page Sep 24, 2018 · 6 revisions

Killer Queen cabinets send out a number of socket messages. Each message has a key, indicating the type of message, and a value, which usually consists of multiple values separated by commas.

Messages from the cabinet use the format ![k[{KEY}],v[{VALUE}]]!, where {KEY} is the type of message, and {VALUE} is a comma-separated string of the values.

Types of messages

v1:

v2: (TBD)

alive

Sent by the cab every 5 seconds to see if the client is still connected. The cab expects a response to this message, otherwise it disconnects the client.

Value format

hh:mm:ss tt

Refer to C# date and time format specifiers.

Examples

Message Explanation
![k[alive],v[11:12:17 PM]]! Cab checked to see if client was still connected at 11:12:17 PM

playernames

Occurs when a new game has begun. It also occurs at the beginning of the demo game in attract mode.

Value format

Unknown at this time. So far the value for this message type has always been a list of 10 empty elements.

Examples

Message Explanation
![k[playernames],v[,,,,,,,,,]]! New game has begun, or attract mode demo game has begun

playerKill

Occurs when a kill happens. This includes every type of kills:

  • Queen kills queen
  • Queen kills warrior
  • Warrior kills queen
  • Warrior kills warrior
  • Snail eats a drone

Value format

{xPosition},{yPosition},{killerId},{killedId}

IDs are as follows:

ID Character
1 Gold Queen
2 Blue Queen
3 Gold Stripes
4 Blue Stripes
5 Gold Abs
6 Blue Abs
7 Gold Skulls
8 Blue Skulls
9 Gold Checks
10 Blue Checks

Examples

Message Explanation
![k[playerKill],v[355.7845,653.2191,1,8]]! Gold Queen killed Blue Skulls at {x: 355.7845, y: 653.2191}
![k[playerKill],v[1206.055,87.92901,3,2]]! Gold Stripes killed Blue Queen at {x: 1206.055, y: 87.92901}