PDA

View Full Version : Online Event Updating


plunK
Jan 27, 2012, 02:02 PM
So I am have finished planning work to do some maps again, but I forgot how event updating works online for triggers, scenery, etc. What is Locally updated? What is updated when the Host updates? What is Universally updated. I am curious about:
-Trigger Scenery
-Trigger Crates
-Destruct Scenery
-Bomb Scenery
-Collapse Scenery
-Animations (all players in sync?)
-Exploding TNT crates, or MCE crates that fire lazers?

Sean
Jan 27, 2012, 05:40 PM
Trigger Scenery is dependent on whether or not Trigger Crate or Trigger Zone is used. A Trigger Crate, when hit, affects the trigger scenery for all players, including the host (which of course means that all players joining the server thereafter continue to be affected by the trigger), while a Trigger Zone, when touched, only affects the player touching it. I'm guessing why this happens is because a Trigger Crate is spawned as an object, and objects in MP, when taken or destroyed, is updated for everyone in the server.

Destruct Scenery is supposed to be a server wide event, but during many games of Ground Force it's not at all uncommon to see someone standing on air. My guess is that the server sends information about what blocks have been destroyed, the client misses it due to packet loss, then the server stops sending information, leaving blocks available to the client.

My take on the other two Sceneries is that they function more or less the same way as Destruct Scenery. Bomb Scenery is rarely used for actual destruction, but as a wall of sorts to prevent ammo going through walls and taking power ups which are meant to be physically visited.

Animations start when a player loads a level, so these are not in sync.

MCE Events and other generated objects have their presence announced to the clients by the server, and are probably treated like any other object.

Seren
Jan 28, 2012, 01:14 AM
A Trigger Crate, when hit, affects the trigger scenery for all players, including the host (which of course means that all players joining the server thereafter continue to be affected by the trigger)
This is basically true, but it's worth noting that in JJ2+ you can prevent joiners from receiving host's trigger setting by placing a Special Trigger Zone. Read section 13. of Plus readme to learn more.
My guess is that the server sends information about what blocks have been destroyed, the client misses it due to packet loss, then the server stops sending information, leaving blocks available to the client.
Just like you, I can only guess, but I don't think the server sends any information about scenery blocks at all. I suppose it only sends information about ammo being launched at some position. However, bullet speed is different locally and globally (you can sometimes notice this in turrets - locally your ammo travels with the fastest velocity possible, but the server and therefore other clients see it travelling with default velocity), which causes different destruct scenery blocks to be hit locally and globally.
MCE Events and other generated objects have their presence announced to the clients by the server, and are probably treated like any other object.
However, you should still keep in mind that any container-type object (including power ups and shields) can be destroyed locally and clients nor the server don't send information about such objects getting destroyed. It's just what they "think" happened, because they see a bullet hitting a power up. They don't have to realize that, client-side, the power up is 500 tiles further from its original position thanks to local triggers.

Sean
Jan 28, 2012, 02:54 AM
This is basically true, but it's worth noting that in JJ2+ you can prevent joiners from receiving host's trigger setting by placing a Special Trigger Zone. Read section 13. of Plus readme to learn more.

This only proves that I should actually start reading readmes.

Just like you, I can only guess, but I don't think the server sends any information about scenery blocks at all. I suppose it only sends information about ammo being launched at some position. However, bullet speed is different locally and globally (you can sometimes notice this in turrets - locally your ammo travels with the fastest velocity possible, but the server and therefore other clients see it travelling with default velocity), which causes different destruct scenery blocks to be hit locally and globally.

Haven't you noticed when joining a server hosting some of the original Battle levels, blocks that have already been destroyed are not shown as being 'there'? This most likely hints to the actual state of the block being sent, as opposed to or as well as the ammo being shot.

They don't have to realize that, client-side, the power up is 500 tiles further from its original position thanks to local triggers.

Ahahahahahahahah (http://www.jazz2online.com/downloads/info.php?levelID=6591).

Seren
Jan 28, 2012, 08:06 AM
Haven't you noticed when joining a server hosting some of the original Battle levels, blocks that have already been destroyed are not shown as being 'there'? This most likely hints to the actual state of the block being sent, as opposed to or as well as the ammo being shot.
While joining, you generally receive more information than usually. But since you said it and I wasn't sure, I checked experimentally and I'm right, during the game clients don't receive any information about scenery getting destroyed. It works in the same way as with container-type objects.

minmay
Jan 28, 2012, 03:05 PM
This is basically true, but it's worth noting that in JJ2+ you can prevent joiners from receiving host's trigger setting by placing a Special Trigger Zone. Read section 13. of Plus readme to learn more.
read this and was like "crap, i forgot about this, i'd better edit Solar so it uses it for that coin warp trigger falling powerup thing"

then i opened it in jcs and realized i had already done it like 5 months ago and forgotten about it

forgetting things makes me feel bad