Staredit Network

Staredit Network -> UMS Assistance -> Switches - "Network Sent"?
Report, edit, etc...Posted by yoni45 on 2006-06-25 at 02:10:19
When it comes to 'network-sent' actions and such (actions that are shared between players to ensure sync), are switch statuses and their changes sent over the network? As in, if one player has a switch on and another player has a switch off, but no actions run based on the settings of these switches, do the players desync?
Report, edit, etc...Posted by Mini Moose 2707 on 2006-06-25 at 13:02:45
Switches are universal. Setting or clearing affects the switch for all players. Players do not "own" switches.
This is why death counters should be used, each player owns their own death counter.

» Moved to Mapping Assistance
Report, edit, etc...Posted by yoni45 on 2006-06-25 at 13:25:06
QUOTE(Mini Moose 2707 @ Jun 25 2006, 11:02 AM)
Switches are universal. Setting or clearing affects the switch for all players. Players do not "own" switches.
This is why death counters should be used, each player owns their own death counter.

» Moved to Mapping Assistance
[right][snapback]512983[/snapback][/right]


Erm, this isn't a "mapping assistance" post, it is a concept post that deals with game sync and ties into EUDs... I know switches are universal, my question is:

if one player's switch is set and another player's switch is cleared, do they desync if there are no actions taken based on the status of these switches? (EUDs can cause triggers to run on certain players and not others...)
Report, edit, etc...Posted by Noober on 2006-06-25 at 13:34:30
QUOTE(yoni45 @ Jun 25 2006, 01:24 PM)
if one player's switch is set and another player's switch is cleared,
[right][snapback]512989[/snapback][/right]

That's impossible, because you said yourself, "switches are universal." One player can't own his own switch and set it while another player takes that switch and make it cleared at the same time.
Report, edit, etc...Posted by DT_Battlekruser on 2006-06-25 at 14:35:51
QUOTE
Erm, this isn't a "mapping assistance" post, it is a concept post that deals with game sync and ties into EUDs... I know switches are universal, my question is:


Yeah, it's assisstance. I'm not really sure what you mean by "one player's switch", as players don't own switches.
Report, edit, etc...Posted by Syphon on 2006-06-25 at 18:06:44
The actions could, the conditions can't. This question is null and void for 1.13f.
Report, edit, etc...Posted by yoni45 on 2006-06-25 at 18:24:57
QUOTE(Noober @ Jun 25 2006, 11:34 AM)
That's impossible, because you said yourself, "switches are universal." One player can't own his own switch and set it while another player takes that switch and make it cleared at the same time.
[right][snapback]512991[/snapback][/right]


Example of an EUD condition (in layman's terms):

Current Player has a text display of "Jack: Hello"

Action:

Set Switch 1.


Now, if that player recieves a message from Jack that says "Hello" but that message is "Sent to Player", all the other players will not have seen that message...

So, Switch 1 is set on the computer of 'Current Player', Jack, but none of the other players. The switches are supposed to be universal, but then, so are all conditions and actions.

If 2 players have 2 different things happening, due to things caused by EUDs for example, a desync happens

Certain actions, though, are not sent over the network. For example, display messages, and mini map pings. If a trigger to play a message runs on one player but not on another, no desync would happen...


QUOTE(DT_Battlekruser @ Jun 25 2006, 12:35 PM)
Yeah, it's assisstance.  I'm not really sure what you mean by "one player's switch", as players don't own switches.
[right][snapback]513018[/snapback][/right]


See above. My question is if one player has a particular switch on in his RAM, and another has that same switch off in his RAM, do we get a desync, or are these not sent over the network, and the only time a desync would occur if there are actions based on these switches being on or off...

It's a possible concept for EUD text detection that could get around the possible desyncs due to text display triggers running at slightly different times due to lag...

QUOTE(Syphon @ Jun 25 2006, 04:06 PM)
The actions could, the conditions can't. This question is null and void for 1.13f.
[right][snapback]513132[/snapback][/right]


confused.gif
Report, edit, etc...Posted by Zeratul_101 on 2006-06-25 at 18:45:49
QUOTE(yoni45 @ Jun 25 2006, 04:24 PM)
Example of an EUD condition (in layman's terms):

Current Player has a text display of "Jack: Hello"

Action:

Set Switch 1.
[right][snapback]513144[/snapback][/right]


i'm gonna have to agree with everyone else. switches aren't like "p1's switch 1", its really more like "everyone's switch 1"

so what that trigger is really doing is setting Everyone's Switch 1.
Report, edit, etc...Posted by MindArchon on 2006-06-25 at 18:58:22
I'm pretty sure when that kind of action would occur, the player who gets the switch set would experience a desync and would be dropped.
Report, edit, etc...Posted by yoni45 on 2006-06-25 at 19:03:40
QUOTE(Zeratul_101 @ Jun 25 2006, 04:45 PM)
i'm gonna have to agree with everyone else.  switches aren't like "p1's switch 1", its really more like "everyone's switch 1"

so what that trigger is really doing is setting Everyone's Switch 1.
[right][snapback]513149[/snapback][/right]


...read rest of post smile.gif
Report, edit, etc...Posted by Zeratul_101 on 2006-06-25 at 19:17:21
you're talking about AFTER a switch has been set for only one player, what i'm saying is it impossible to make a switch set only for one player. the only way i see that happening is with EXTREME lag(i'm still not sure that would happen anyway), in which case they would lag out. but if it would somehow be possible for that to happen without someone lagging out, then yes, i would agree with everything you said about desyncing when triggers dependant on the switches ran.
Report, edit, etc...Posted by yoni45 on 2006-06-25 at 20:26:41
QUOTE(Zeratul_101 @ Jun 25 2006, 05:16 PM)
you're talking about AFTER a switch has been set for only one player, what i'm saying is it impossible to make a switch set only for one player.  the only way i see that happening is with EXTREME lag(i'm still not sure that would happen anyway), in which case they would lag out.  but if it would somehow be possible for that to happen without someone lagging out, then yes, i would agree with everything you said about desyncing when triggers dependant on the switches ran.
[right][snapback]513178[/snapback][/right]


Well that's the thing, it's very possible, and doesn't require extreme lag. In the case of EUD text detection, that's precisely the case, and in some cases, doesn't require ANY lag whatsoever, simply different line numbers used at different times or private messages that not everyone can see...

My question is: are switches are kept track of by different players, and if different switch values would desync a player, or is it something that's simply saved in the player's computer's memory, and would only desync a player if an action runs based on the switch...

If one thinks about it, switches ideally don't change the course of the game until something is done that depends on them. So it could be that if a player has a switch different, and nothing acts on that switch, the "game" wouldn't really "notice" (ie, not desync the player)
Report, edit, etc...Posted by Zeratul_101 on 2006-06-25 at 20:57:45
unless you've found some new working EUD Actions, you can't make a switch set for one player(because its not owned by a player). what you're saying is if i set P1 deaths of marine to 1 and left p2's at zero, then a trigger with a death conditon for p1's marines will desync P2 because his value for his deaths of marines is different.
Report, edit, etc...Posted by yoni45 on 2006-06-25 at 21:08:00
QUOTE(Zeratul_101 @ Jun 25 2006, 06:57 PM)
unless you've found some new working EUD Actions, you can't make a switch set for one player(because its not owned by a player).  what you're saying is if i set P1 deaths of marine to 1 and left p2's at zero, then a trigger with a death conditon for p1's marines will desync P2 because his value for his deaths of marines is different.
[right][snapback]513228[/snapback][/right]


This is just for the sake of educating now heh...

You're mixing up the idea of values that may differ in the memory of 2 computers, and game values...

Deaths of a unit for P1 and deaths of a unit for P2 are 2 different game values.

That means, that the number of deaths for a particular unit are saved on each players computer, for ALL players.

As in, Player 1, on his computer, has the death counts for player 2, player 3, player 4, etc. for all the units, saved in his memory.

In this case, a desync would occur, if (for example), on Player 1's computer, the number of deaths for marines for Player 3 is 45, but on player 2's and player 3's computers, the number of deaths for marines for P3 is 46. (In this case, P2 and P3 would drop from P1's game, and P1 would drop from P2's and P3's game)


Actually, I'm not sure if a desync would occur in this case either, unless again, something acts upon those deaths counts...

Such an effect also wouldn't be caused by EUD actions, but by EUD conditions that are already available.

I already gave this example, but I'll give it again.


Example of an EUD condition (in layman's terms):

Current Player has a text display of "Jack: Hello"

Action:

Set Switch 1.


Now, if that player recieves a message from Jack that says "Hello" but that message is "Sent to Player", all the other players will not have seen that message...

In other words, if only the recieving player and Jack can see that message on their screen, then the condition only gets fulfilled on their "version" of the game, and the trigger ONLY runs for THEM. In other words, Switch 1, only gets 'set' on THEIR computers, but not on everyone else's.

The question is, does this cause a Desync? Ideally, nothing actually changes in the game until another trigger acts on that switch.

For example:

Condition: Switch 1 is set

Action: Create 1 Marine for Current Player at Anywhere.

With this above trigger, it would only run on the computers of the players that "saw" the message on their screen and had the switch set in their game. Since a marine pops up on their version, but not on the other people's version, you get a desync, or a server split.

The standing question, is if the desync happens only once the Marine trigger fires, or as soon as the switch settings don't match up between players...

I'll probably test this myself now that I'm home... this took more work to explain than to get an answer... oh well, maybe this'll help some of the people here happy.gif
Report, edit, etc...Posted by Zeratul_101 on 2006-06-25 at 21:53:02
i understand what you're trying to say about mismatched values. i agree that such a desync wouldn't happen until a trigger required the mismatched data(since the computers wouldn't really 'know' there was a mismatch until that point). but since switches are global, it would automatically send the modified data to everyone else in the network. the only way i know of such a process being interrupted is with lag.
Report, edit, etc...Posted by DT_Battlekruser on 2006-06-25 at 22:50:44
I would expect that switches and anything else that originally was coded as part of values used in maps has core code to stop desyncs, i.e. I don't think it would be possible to have one player's RAM be off from another's in terms of switches.

If switches could desync, then desyncs would routinely happen without EUD conditions. So, I'd have to say that by whatever coding, switch desyncs are impossible.
Report, edit, etc...Posted by yoni45 on 2006-06-26 at 01:02:31
QUOTE(DT_Battlekruser @ Jun 25 2006, 08:50 PM)
I would expect that switches and anything else that originally was coded as part of values used in maps has core code to stop desyncs, i.e. I don't think it would be possible to have one player's RAM be off from another's in terms of switches.

If switches could desync, then desyncs would routinely happen without EUD conditions.  So, I'd have to say that by whatever coding, switch desyncs are impossible.

[right][snapback]513312[/snapback][/right]


Well of course, in regular game, theres boundaries put it to stop it from desyncing...

However, the question would be if the switches values were not in sync, would they drop players?


After some testing, the answer, fortunately, is no.

That means, that if one player somehow gets a switch on a different setting than the rest of the player, he or she will NOT drop out of the game...

The reason this could potentially be important, is it gives us a method to re-sync player text display based triggers... (please move this back into concepts, well, I'll make a new topic there now anyway...)

First, to recap the issue: If there is any slight lag in the game and text-display based triggers are used, it desyncs the game because the triggers go off at different points in time (milliseconds apart, but enough to desync and drop "everyone else" out of the game)...

However, switches don't act as actions that are kept in-check for the "sync" of the game, so if the text-detection condition is used, and all we do is turn on one of the switches, noone gets desynced...

Now, whatever we wanted to do with that text-detection, we simply set with a different condition:

Trigger
Conditions:
¤ Switch 1 is Set
¤ Deaths of Cocoon for P1 is more than 100
Actions:
¤ Create Marine at Anywhere



That particular death condition isn't for EUDs, but simply a death-count based timer. We simply keep a timer going from 1-100 (for example, could be less or more), and every 100 cycles (with hyper triggers, about 9 seconds), we check for the switches...

If the text message was detected, it only acts on the switches, and that only goes through once *everyone*'s switch trigger went through...
Report, edit, etc...Posted by Zeratul_101 on 2006-06-26 at 01:11:33
oh, thats what you wanted to do. very nice idea indeed. you're just full of good ideas aren't ya
Report, edit, etc...Posted by Demaris on 2006-06-26 at 01:51:52

That's a very smart way of using EUD conditions without desyncing.....
Report, edit, etc...Posted by Doodle77(MM) on 2006-07-08 at 11:33:05
you see, switches can only be changed by triggers, and (normally) conditions are met at the same time on all the computers in a game.
So if Trigger A is
If elapsed game time is exactly 32 seconds: Set switch 1.
then the game time will hit 32 seconds on all the computers at once, and they will all flip the switch.
If trigger B is
If player 1 brings exactly 1 marine to location 1: Set switch 1.
Player 1 will give his marine the order to move, and it will be relayed to all the other computers that player 1 told unit id #X to move to x,y, and all the computers will have p1's marine moving and it will enter the location and set the switch at the same time on all computers.

Basically what I mean is that the only thing that goes over the network is human interaction.

I am 90% sure this is how Starcraft works over networks.
Report, edit, etc...Posted by yoni45 on 2006-07-08 at 12:06:16
QUOTE(Doodle77(MM) @ Jul 8 2006, 09:32 AM)
you see, switches can only be changed by triggers, and (normally) conditions are met at the same time on all the computers in a game.
So if Trigger A is
If elapsed game time is exactly 32 seconds: Set switch 1.
then the game time will hit 32 seconds on all the computers at once, and they will all flip the switch.
If trigger B is
If player 1 brings exactly 1 marine to location 1: Set switch 1.
Player 1 will give his marine the order to move, and it will be relayed to all the other computers that player 1 told unit id #X to move to x,y, and all the computers will have p1's marine moving and it will enter the location and set the switch at the same time on all computers.

Basically what I mean is that the only  thing that goes over the network is human interaction.

I am 90% sure this is how Starcraft works over networks.
[right][snapback]520074[/snapback][/right]


I guess it depends on what you consider 'human interaction'... Basically, after some testing (for which I posted the results a few posts up...), I found that the status of switches is not something that is kept in check between computers to ensure the game is in sync...

Something such as the position of a marine, on the other hand, is (obviously) kept in check, so if 1 computer has a marine in one place, but for another player, that same marine is in a different place, then the 2 players desync and drop out of each other's game...

The significance of that is that those switches can be used to manually sync things such as text detection EUD triggers that would normally desync players from each other if used directly...
Report, edit, etc...Posted by DT_Battlekruser on 2006-07-08 at 15:05:18
The reason EUD conditions desync is because there is no hardcore coding in Starcraft to ensure that the things EUD conditions check are presicely synced for all players. They never saw a need, seeing as text on the screen was never intended to be a condition.
Next Page (1)