> Wait, my players have to be *on the same layout*? This is a huge, huge problem.
>
> My plan for multiplayer (a zelda-y world that players can move freely around in) was:
>
> -Every screen of the world is a separate layout (makes life easy in a number of ways)
>
> -Players only sync data with other players in the same layout as them (so if you're the only player in a given layout, you're not syncing with anyone)
>
> -Global world variables (is it day or night? Are there orcs attacking the castle?) sync globally once every five seconds (for low bandwidth consumption)
>
> This seems like it would be low data while still allowing the feeling of a 'permanent' world (with most things including character save data handled by the client, at least at first, I'm not a professional operation I don't feel the need to move everything server-side).
>
> But according to what you're saying, this extremely simple vision would be impossible?!
>
> Ugh.
>
No your players do not have to be on the same layout.
As long as you do not want a single host determining everything, you should be in the clear.
ATM it is like, every single layout, requires at least 1 host. Be it peer or a 'super host'
Ah, okay! So could I do it like this?
No super hosts; whenever a player moves into a layout, that player becomes the 'peer host' of that layout, and anyone else who enters the layout will enter the peer host's version.
So when a player enters the "Dangerous Cave" layout, the game pings the signaling server to see if anyone else is currently hosting the 'dangerous cave' layout, and if so it connects them, and if not that player becomes the first 'peer host' of the 'dangerous cave' layout. That will work?
And then for syncing global variables, I could use WebKit or something like that for syncing the global variables from a simple data file I host on a server somewhere? So, for example, if the world has a day/night cycle, that will sync up across all players playing the game through a separate mechanism than the multiplayer object?