all required documentation to install multisync should be available here http://forum.thegamecreators.com/?m=forum_view&t=99188&b=5
There is a lot more to multiplayer. For instance the server/client method is not the only method, but it's by far the most common and there's no point getting bogged down with the details
Following on from my original post.....
(don't worry about this until you can successfully connect to a game and send/receive some data)
With the server/client method, keep in mind that clients do not send any information to other clients. They only send it to the server. MultiSync does not automatically forward that information onwards. I.e. let's say there are 3 players in the game
Player1 is the host, and players 2/3 are both clients.
The model would look a bit like this
__Player2 (client)
Player1 (server)__/
\__Player3 (client)
If Player1 sends a message to all, then both player 2 and 3 will receive it. If Player 2 sends a message to all, then' only' player1 will receive it, because messages ONLY go to the server from a client! doesn't matter what player number you specify
For some information this doesn't actually matter - and i'll explain why shortly - however for certain packets such as 'chat messages' this is a problem, since player2/3 won't see each others messages. To overcome this the process must be
Player2 sends to Player1 -> Player1 receives message, sends a copy to 'all' players -> Player2 & Player3 receive message
There's a more efficient way to do this (player2 doesn't need to receive his own message again) but for the sake of simplicity let's stick with this for now
This is fairly easy to implement. On the server side all you need to do is check for incoming messages, and anything received is sent out again
i.e.
// Server code
while net get message() // if there's a message ready to be received
net$(0)=net get string()
// I personally use an identifier for each message type, chat messages are "msg" followed by another string
if net$(0)="msg"
net$(1)=net get string() // the actual message, i.e. "hi all"
// do stuff to display message on this computer
net put string "msg" : net put string net$(1) // puts the message in the 'queue', but doesn't send it just yet
endif
endwhile
net send all // send any messages waiting in the queue
net send 0 // after sending, must specify this command to 'clear' the queue
Keep in mind that if you are implementing a chat system, and using the method above, you need to make sure that whenever a chat message is sent from the server, the server will immediately display it's own messages and not wait for a reply from the client (since the client should not be sending chat messages back to the server again, otherwise it'll be bouncing back n forth forever)
However on the client side, they should not show their own messages immediately, instead they should only show what is received back from the server. Otherwise they'll end up showing their own messages twice (once when first sent, once again when the server sends it back to them)
Some data does not need to be 'sent back' immediately, such as player positions. These should be sent from the server constantly, so any client's should always be receiving the most up to date information anyway and there is no need to get an immediate bounce-back on this sort of information. Chat messages however are different, because they are unique and only sent on occasion, they need to be bounced back from the server to all clients. Hope this makes sense