Anchor syncing bug |
Leafileaf « Citoyen » 1595822880000
| 5 | ||
This bug has actually been around from the earliest of days (since anchors were introduced, actually), but it didn't affect much so it has gone relatively unnoticed. However, when Atelier made the decision to switch to less powerful servers recently, the bug has become way more apparent and severe due to frequent lagspikes. Of course, the bug I am talking about is the delay between spawning an object as a shaman and the object anchor attaching. This shouldn't be happening. When the shaman spawns an object, it appears immediately and starts interacting with other physicsbodies present. However, the joint representing the anchor doesn't actually appear until much later. More specifically, when the spawn is complete on the shaman's side (the progressbar representing the spawn progress is filled up), the shaman's client looks for objects behind the nail, and sends the server 1. information about the newly spawned object (object type, coordinates, angle, etc) and 2. a list of joints that should be created to attach the new object to the old one(s)*. The server then distributes this information to all connected clients, resulting in them seeing the object spawned with the relevant nails. The problem lies in the fact that the shaman's client also waits for this information (which it already calculated in order to send to the server) to be sent back to it before it will create the nails. During this time, the object is already spawned on the shaman's client and can interact with the physics engine, including 1. pushing objects it should have been nailed to, which should not have been possible as nailed objects don't collide with each other*, and 2. falling into a hole or such only to be reattached when the client receives the nail packet, causing the entire build to be dragged downwards**. This behaviour is ridiculous, since the shaman is also the sync** and the discrepancy between the object being physical and the nails being attached could ruin a construction on the shaman's client - and when the sync's build is ruined, it also appears as ruined for everyone else after a brief delay. * There actually is a separate bug about how the anchoring in this step is done, but it is unrelated to the current issue. ** Shamans with insufficient time in the game will not be sync. Pink shamans will also not be sync unless the blue shaman does not meet the requirement to be sync. In these cases, the effects of this bug is less pronounced, as the sync (not the shaman!) receives information about newly spawned objects and anchors simultaneously, and can simulate proper behaviour - and only the sync's view matters. Bug. As shaman, when spawning objects with anchors, the anchor only connects after a delay. Reproduction. For more noticeable results, your connection should lag a little (200+ ping - a VPN or proxy should be used if the connection is good). Spawn a plank that extends somewhat (~90px, or 3 small boxes) beyond the edge of a ground. Then anchor another plank, facing downwards, on the extreme edge of the first plank. Watch as it falls and then reconnects, pulling the first plank down (this is not due to weight alone - verify this by performing the exact same setup and placing an anvil on the other side, spawning the plank, then deleting the anvil). Root cause. See the Bug tab. |
Inthebin « Citoyen » 1595832360000
| 1 | ||
https://pastebin.com/raw/6xa7jZCQ I made this a while ago while finding a use for the cheese loop. It only works if you /sy the host otherwise it will run until runtime error. To use it, you just spawn a long plank on the right side of the wood using any center nail. Typing !r will reset everything. My anchor "speed" hovers around 300ms and it sometimes jumps to 900-1000ms with my usual 214+ms ping. Dernière modification le 1595833140000 |