Skip to content
Tomen edited this page Oct 23, 2014 · 2 revisions

Messages contain a message type and a payload.

The following message types are currently used:

  • CHAT
  • ENTITY
  • ENTITY_REMOVE
  • HANDSHAKE
  • PLAYER
  • PING_PONG
  • COLLISION

CHAT

Contains a chat message. Fields

  • from: the name of the sending user
  • message: the actual message

ENTITY

Used to send an entity from the server to the client. If the entity already exists, it is updated.

ENTITY_REMOVE

Used by the server to tell clients that an entity was removed from the world. Right now, this is only used for disconnecting clients.

HANDSHAKE

Sent from the client to the server to request a player entity.

PLAYER

Sent from the server to the client as a response to the HANDSHAKE request. Contains the players entity.

PING_PONG

Development time message to debug connection issues.

COLLISION

Sent from the server to clients to indicate that a collision between two entities happened.

Clone this wiki locally