Skip to content

Update map packet

lestofante edited this page Mar 8, 2012 · 12 revisions

Overview

This TCP packet is sent by the server to every connected client to send information regarding:

  • other connected players
  • every entity in the game

The type of this packet is -125.

Structure

byte value
0 -125
1->2 number of player
... ...
0->1 number of entity for this player
2->3 player unique identifier (unsigned short int)
4->33 player ASCII name padded with whitespaces (30 byte)
... ...
0->1 entity unique identifier (unsigned short int)
2->3 char (unsigned short int) indicating the ID of the blueprint to build the entity model (graphical and phisycal)
... ...
As you may already have noticed, the ellipsis indicate that there may be more than one player per packed and entity per player, although every player and every entity have the same structure. The final packet results then in 'n' players, every one followed by his 'm' entities. Also we implement the short int as a **char** in java, again because it doesn't natively support unsigned short ints.

Related pages

Network packet types

Clone this wiki locally