New multiplayer mode with looser synchronization

Koshling

Vorlon
Joined
Apr 11, 2011
Messages
9,254
The 11 player multi-player game we've just started has caused me to start thinking about new multi-player modes of operation.

The big issue we have, is that (because we're spread all over the world and have different play times), the strictly ordered turn-by-turn mechanism of PBEM leads to inevitable delays and makes it hard to even get in a single turn per day.

So, I wanted to start a brain-storming thread to discuss ways the model could be changed to enable faster progress, while still allowing for the same geographic distribution of players.

What follows are suggestions only, to which tweaks, criticisms, and entirely alternate suggestions are extremely welcome - for now I just want to get as many ideas under discussion as possible. Something concrete may or may not come of them, depending on the degree of consensus we reach.

Proposal:

1) Game file to be hosted on a simple server, which the game is modified to interact with (this will just be a passive server that supports HTTP PUT and GET, which means hosting it for free should be easy)

2) While anyone is actually taking their turn the game will lock the save file on the server, preventing anyone else trying to play their turn at exactly the same time (this allows all processing to remain on one machine and means we don't have to fundamentally change the game engine in anyway)

3) Subject to a number of conditions (see later) a player may play their turn at any time. Furthermore they may play up to N turns ahead (of the most behind other player), where N is a game parameter to be set by mutual agreement (and ideally changeable as the game progresses). The conditions would include (feel free to add to this list or counter-suggest):
  • A declaration of WAR requires turn synchronization between the two players involved
  • An attack on a unit requires turn synchronization
  • Moving into another player's territory without an open border agreement (even if at war) requires turn synchronization with that player
  • Founding a city or popping a goodie hut on a plot that is currently visible to another player requires turn synchronization with that other player

4) When an action requires turn synchronization then:
  1. if both players are on the same turn it may go ahead.
  2. If the player attempting to make the action that requires synchronization is behind in turns, they are told the action is not possible until they play another <however many> turns in the same session (to put them on the same turn) at which point they can do whatever it was they wanted to do.
  3. If the player attempting to make the action that requires synchronization is ahead in turns they get a popup telling them that they must wait for the other player to catch up and asking them if they want to enforce synchronization. If they say 'yes' then their turn ends without completing (so they can resume it next time they play) and the game forces the other player into synchronization during their next play session (i.e. - once they play the same turn they will not be allowed to go further). If they say 'no' they can continue normally with any actions that do not require synchronization.

The idea of this setup is to provide something a little like simultaneous turn multi-player, but much more loosely coupled. Early on (or indeed in times of peace) it would mostly be possible to play a few turns at a time (say 5), and to do so at any time of day, so we should be able to get through 5 or more turns per day, especially in the early game. As more player interaction crop up, deeper into the game, more strict turn ordering gets enforced by the above rules (and any others we might add). In peace-time I would expect things to still flow fairly freely. War time would likely slow things down, but even then, rather than waiting for every player to play in turn it's only 2 or 3 players that must play in strict sequence relative to one another, so it should still bottleneck far less than a regular PBEM game.

Opinions, ideas, suggestions, criticisms, ....
 
I have no idea how to program, so I don't have much in saying about that. But I can really see the big problem with what we currently have. If it just was possible to make your turn without restriction to who do it first, it will be much much easier. If all people was just basic active that will mean we could make multiple turns everyday without making complicated programming.
(Like you are able to make multiple turns ahead of others if you just don't do aggressive actions. That sounds very hard to do)

I Have always dreamed about if this mod could be like Cosmic supremacy http://cosmicsupremacy.com/. Every turn is 1 or 2 hour long. So everybody makes their turn simultaneously. The problem is that you then need to assign governors to your planet that will do some basic rules you have ordered them to do while you are gone. And you also need to do that with your armies. Making AI take over when you are not around. giving them basic commands

Try the game and you will see what I mean
 
Why not use Pitboss and then base some of the extended behavior like playing turns ahead on it?
 
3.d., Founding a city or popping a goodie hut on a plot that is currently visible to another player requires turn synchronization with that other player

Only constraint I can see on this one is early game when you have no Idea the Goody Hut is visible to another player. It would be like 2 dif Civs scouts "seeing" a goody hut but not each other, until they both try for the hut. And then their Visibility range allows the other to be seen. Race to goody hut is then On.

But overall that's not an every turn occurrence either.

I see no objections on my part.

JosEPh
 
Why not use Pitboss and then base some of the extended behavior like playing turns ahead on it?

Doesn't pitboss require a host for the game engine that everyone can reach?
 
I wish play by email didn't force people to have turns in a certain order... In other words everyone can have a turn a day but they don't have to wait for others to do so. Basically everyone can have turn 2 today but one player doesn't have to wait for other players... They can just have their turn out of order but must wait for every player to have had a turn 2 before they can have a turn 3.

That would make everything so much easier and shouldn't be too hard to program right?

Hopefully you could apply that to our current game by modifying the way pablum works so we don't have to start again.

So the current system:
Checks who's turn it is.
Checks if your computer is that player
If so initiate turn but if not dont open.

The new system should:
Check if you have had your turn yet (to make sure you never go two turns ahead of everyone else)
If not open the correct civ on your computer allowing you to have your turn.
Once everyone has had their turn (in no order) allow all player to have another turn in any order.
 
I wish play by email didn't force people to have turns in a certain order... In other words everyone can have a turn a day but they done have to wait for others to do so. Basically everyone can have turn 2 today but one player doesn't have to wait for other players... They can just have their turn out of order but must wait for every player to have had a turn 2 before they can have a turn 3.

That would make everything so much easier and shouldn't be too hard to program right?

Shouldn't be too hard, but I was thinking we could do better. It's not totally trivial either though, since it would need a new load screen asking who you are and taking the password before unlocking the right player.
 
Shouldn't be too hard, but I was thinking we could do better. It's not totally trivial either though, since it would need a new load screen asking who you are and taking the password before unlocking the right player.

Please do that as a start. If one don't respond within a day, the AI could do the move
 
Shouldn't be too hard, but I was thinking we could do better. It's not totally trivial either though, since it would need a new load screen asking who you are and taking the password before unlocking the right player.

Well in that case can you program that first for now? Since then we can all have a turn whenever we like and definitely get 1 turn in per day since we can log in any time. I'm guessing it should take a week to get that programmed? Then we can all update to the latest version in our mp svn and our pbem file can either be read differently by the game itself to take turns in any order or you can modify our save to the new non-turn order format.
 
Well in that case can you program that first for now? Since then we can all have a turn whenever we like and definitely get 1 turn in per day since we can log in any time.

Actually 'any order' doesn't work. It means 1 person can have two goes in a row relative to another person, which is a MASSIVE advantage during a war. So even that needs controls of the type I outlines in the lead post.
 
Actually 'any order' doesn't work. It means 1 person can have two goes in a row relative to another person, which is a MASSIVE advantage during a war. So even that needs controls of the type I outlines in the lead post.

Well what about a check to allow any player to take their 3rd turn in our scenario yet add a "this player took their turn last" binary to the last player who had turn 2 which prevents them having a turn 3 until any other player has had a turn 3?
 
Well what about a check to allow any player to take their 3rd turn in our scenario yet add a "this player took their turn last" binary to the last player who had turn 2 which prevents them having a turn 3 until any other player has had a turn 3?

Any change of order means SOMEONE goes twice before some else who went before them the previous time. If those two are at war that doesn't work. It's not a first/last thing - it's ANY change of order. For example suppose you and I are 3rd and 5th on one turn, then swap the next turn. That means that whichever of us was 5th the previous turn is now 3rd so we get BOTH moves before the other can respond.
 
Well you could have two options when creating multiplayer games... A pbem strict (current) and a pbem (loose) which allows us to have our turn of out order. It may be unfair but hey... It would work and the "unfairness" would be less of an issue than the struggle to have your turn in order.
 
Any change of order means SOMEONE goes twice before some else who went before them the previous time. If those two are at war that doesn't work. It's not a first/last thing - it's ANY change of order. For example suppose you and I are 3rd and 5th on one turn, then swap the next turn. That means that whichever of us was 5th the previous turn is now 3rd so we get BOTH moves before the other can respond.

well that encourage you too be quick or else the other take the turn first, but no matter what we still get the same amount of turns in total. That is like saying who that has the first turn is unfair because he can react before the person who is number 2.
 
Doesn't pitboss require a host for the game engine that everyone can reach?
Yes, that means it is more involved than a simple file server. It has the advantage though that you can play concurrently as well and it is already programmed (will need some bug fixing though).
 
Yes, that means it is more involved than a simple file server. It has the advantage though that you can play concurrently as well and it is already programmed (will need some bug fixing though).

The need for an active host is a complete killer though so far as I am concerned, for these world-spanning games.
 
The need for an active host is a complete killer though so far as I am concerned, for these world-spanning games.

Can't you just not save the game? When it only require one person to be the host and that can be anyone? Can he save the game and thereafter quit the server, then another person start the game as host? I don't know about that program
 
well that encourage you too be quick or else the other take the turn first, but no matter what we still get the same amount of turns in total. That is like saying who that has the first turn is unfair because he can react before the person who is number 2.

I agree... It's adds another depth of stradagy into the game encouraging players to be faster just like an rts game would... Not that you like rts games lol ;)
 
The idea of loose synchronization like this is in itself... adventurous. Implementing it on top of an existing engine... well, you know, a week ago I saw someone skiing on lake ice, right near the shore. I don't think it's gone below -5 degrees (celsius) this winter yet. Implementing loose synchronization on top of an existing engine designed for strict synchronization would be a lot like turning to try to ski over the middle of that lake.

It's probably best not to even consider the possibility of optimistic concurrency control. Implementation insanity aside, I'm not sure people would appreciate having to replay their turns sometimes, losing wonder races that they had won in their own gamestate several turns ag, etc.. Then again you didn't even bring that up yourself, so...

Even with pessimistic control, it's a really hairy problem. Like, really hairy. Like, take the very simple case of two scouts' paths crossing. That can make a huge difference in gameplay as you change your early plans depending on where you infer your neighbours are. But if you take five turns to move over an area, and the other guy takes his turns to move over the same, you don't see each other. In CS terms the schedule is no longer serializable - the outcome has become different because concurrent actions were taken in a different order. But if you disallow people from playing ahead of each other in that situation, the game will go to turn-to-turn very, very quickly, as soon as there's any chance of different players meeting each other.

So what you need to do is somehow come up with a set of synchronization conditions that both allows for playing ahead and doesn't allow for horribly unfair or crazy situations. I'm not sure whether that or the actual implementation itself would be harder. Well, both can probably be half-assed with a few weeks' work, but there's also going to be a bunch of weird dark corner cases for both.
 
The idea of loose synchronization like this is in itself... adventurous. Implementing it on top of an existing engine... well, you know, a week ago I saw someone skiing on lake ice, right near the shore. I don't think it's gone below -5 degrees (celsius) this winter yet. Implementing loose synchronization on top of an existing engine designed for strict synchronization would be a lot like turning to try to ski over the middle of that lake.

It's probably best not to even consider the possibility of optimistic concurrency control. Implementation insanity aside, I'm not sure people would appreciate having to replay their turns sometimes, losing wonder races that they had won in their own gamestate several turns ag, etc.. Then again you didn't even bring that up yourself, so...

Even with pessimistic control, it's a really hairy problem. Like, really hairy. Like, take the very simple case of two scouts' paths crossing. That can make a huge difference in gameplay as you change your early plans depending on where you infer your neighbours are. But if you take five turns to move over an area, and the other guy takes his turns to move over the same, you don't see each other. In CS terms the schedule is no longer serializable - the outcome has become different because concurrent actions were taken in a different order. But if you disallow people from playing ahead of each other in that situation, the game will go to turn-to-turn very, very quickly, as soon as there's any chance of different players meeting each other.

So what you need to do is somehow come up with a set of synchronization conditions that both allows for playing ahead and doesn't allow for horribly unfair or crazy situations. I'm not sure whether that or the actual implementation itself would be harder. Well, both can probably be half-assed with a few weeks' work, but there's also going to be a bunch of weird dark corner cases for both.

Yeh, agreed. I had considered the scouts case and panned to add another requires-player-relative-sync condition:
Unit not previously visible to player A becomes visible to player A - requires turn sync between the two players concerned

My feeling (guess really) is that eventually (mid game on) the scheme would degenerate back to being essentially serial, but the big advantage is before everyone knows the entire map. At the very start everyone is essentially independent, and a bit later the dependencies are only amongst small subsets of players (e.g. - those on a continent say), so the time-zone blocking has a smaller scope and should lead to a lot less overall delay. This means the game should progress fast to the part where it starts to get more interesting.
 
Back
Top Bottom