I'm trying to implement multiplayer in my game. So far I've got it at the point that I can send and receive messages.
I'm making a pong like game which is playable with a mouse.
movex = 0 + (MOUSEMOVEX()/10)
IF movex<0
side=side-ABS(movex) : speed=8
ELSE IF movex>0
side=side+ABS(movex) : speed=8
ELSE IF movex=0
speed=0
ENDIF
ENDIF
ENDIF
The game is a 2 persons game. Now what I think I must do is send a packet with the X-movement of the paddle in a message. Also, for the client the host has to send the position of the ball (correct?) so my message would be:
message$ = "x_paddle,x_ball,z_ball"
(the game is 3d but the ball won't go up and down)