turn based and internet play

Blitz3D Forums/Blitz3D Beginners Area/turn based and internet play

I would think an event-oriented architecture would make the network side of things super easy. If your program is event-driven, you'd only need the active player to send all his game GUI events to the other players: other players' computers would then process the events separately. Events might be low-level (e.g. "left mouse click at 750, 631") or high-level (e.g. "unit 5 moves to 10,14", "select unit 6", "action window opens", "spellcasting window opens", "spellcasting window scrolls to 5th item", "unit 6 casts fira at 12, 16".) When the game is in "watch" mode, simply lock out user input and use the events that are sent by the active player.

Showing the current position of the mouse pointer should probably be handled differently: just send the current position every X milliseconds. Careful not to trigger duplicate mouse hover events for the clients!