
Tutorials |
Cogging for mutliplayer is difficult because many network features of JK have not been tested and documented, and putting all of the info together can be very confusing. This tutorial will help bring the info together so you can use it effectively.
There are only two ways a cog message is sent. The message is either sent only to the host player or it is sent to all players.
The cogscript (or more simply, cog) flag 0x40 controls which players receive the messages. When the flag is clear, only the host player receives the message. When it is set, then all players receive the message. A few messages ignore this setting and always send to the same players.
There are many ways to sync data.
This is where the difficulties really come in. Yes, there is the cog flag 0x200 that syncs data when clear, but the real story is much more complicated. We are unsure what is synced when the 0x200 flag is clear. Also, we aren't sure what syncs data regardless of the setting. The good news is that there is an effort to decipher the network messages that JK uses, so we can document what actually is sent between computers and when.
Thus, there are four main options:
(To be continued.)