Transport Layer:User Datagram Protocol (UDP)
Application Layer:SCGP Messages (SCGP)
Message Id:0x4F
Message Name:SCGP_MAP
Direction:Peer to Peer
Used By:Starcraft Original, Starcraft Broodwar
Starcraft Shareware, Starcraft Japanese
Message Format:
(does not include protocol header)
(UINT8) ID (0x4F)
(UINT16) Lengh of payload (discluding this value)
(UINT16) Event
Event 0x00:
(UINT16) 0x100
(UINT32) File Position
Event 0x01:
(UINT32) File Lengh
(UINT32) File Checksum
(STRING) File Name
Event 0x02:
(UINT8) Player ID
(UINT32) File Position
Event 0x03:
Event 0x04:
(UINT8) 0x00
(UINT32) File Position
(UINT16) Data Block Lengh
(VOID) File Data Block
Event 0x05:
(UINT8) 0x00
(UINT32) File Position


Packet CLS 1.

This packet is used to manage map downloading. Some important things to note: Players don't just download the map from the host. The host can request other ingame players send it, if they already have it. Data blocks are send in blocks of 128 bytes at a time, but you can get away with 256 blocks with out issue.

Event 0x00 [C>H]: Tells the host if you have the map or not. For example, the map positon tells the host where to start sending the file from. If you already have the map, then the Map position should be the lengh of the file.

Event 0x01 [H>C]: Asks a player if they have the given map. Players should respond to this, with event 0x00.

Event 0x02 [H>C]: Tells the receiving player, to send the map to another player.

Event 0x03 [H>C]: I'm not to sure about this one. This is send to a player who has just finished sending the map to another player, and also when the game is starting.

Event 0x04 [C>C]: Used to send a block of the map to another player. Receiving players should verify the block of data, by sending event 0x05. Any breaks in the UDP stream should be managed with standard resend requests.

Event 0x05 [C>C]: Verifies the position of the map you are currently at. This should be sent as a respone to event 0x04.



no one has commented yet.