Yup. I need multiplayer help. Wait, wait, stop the flaming and stuff. Not a MMORPG, not a MORPG, not a online RTS, no, no, no. It's far simpler than that. But, even though I've read every manual, searched the forum down to posts made years ago, completed any tutorial... I just can't get any MP to work.
A turnbased game, multiplayer type 2 (server-client) in which up to four players can play their turns simultaneously WITHOUT seeing eachother. Exactly. No position sending or so, no difficult interpolation things... No.
I've got four arrays, of which certain data needs to be synchronized over all players when ALL players end their turn. I've tried memblocks, loose integers, well, anything. Just can't get my head understanding the system.
I need three triggers, that do stuff:
- Turn End (sends to the server that a player is done with a turn, and sends the array data described below to the server to sync it with the others when ALL TURNS ARE ENDED).
- Turn Start (players get 15 seconds to decide for Move, Skip or War. If after 15 seconds, no choice is send to the server, the server sends the client a skip turn signal, and triggers the Turn End trigger on that client).
- Vendetta (player send another player a combat invitation. This can be accepted or rejected. If accepted, I'll need to set up a MP combat system, but I hope I'll understand everything after getting this to work. If rejected, I want to run some code. If requesting or accepting the vendetta, the Turn End trigger is set.)
The array data is:
pnr = player number
player(pnr,2,[1-6])
player(pnr,3,[1,3])
At game start, I'd need to sync this data:
names$(pnr,[1-2])
game([1-3])
If a Vendetta is triggered, I'd need to sync this between the two players:
gangsters(pnr,[1-player(pnr,2,6)],[1-8])
Is anyone NOT as confused as I am? I really tried for four-five days, now, but I just can't. It's as if some invisible wall stops me from understanding it. I tried to write it into these functions:
PREGAME:
StartData() | Sends the names$ array at game start to the host.
RecieveStartData() | Checks for incoming StartData()
SyncStartData() | Sends all StarData() as soon as all StartData() is in.
INGAME:
SendEndTurn() | END TURN TRIGGER
SendStartTurn(#) | # = 1: Skip, 2: Move, 2+pnr: Vendetta against pnr.
UpdateAll() | Synchronize all data (!)
RecieveTrig() | Check for triggers, should be done on the server only. It stores the trigger in a hypothetical array DIM Trig(4), which if all fields (players) are 1 (TRUE), triggers UpdateAll().
So, can anyone help me out on how I'd do this? As said, I can program well enough to grasp the idea if I see it, but with MP I just need a big extra hand...

A mod has been erased by your signature because it was larger than 600x120