Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
10-07-2009 04:39
Recently been battling with the issue of getting multiple-participant animations to synchronise properly, and unfortunately our only current solution seems to be to wait X seconds and restart the animations, hopefully forcing them to restart at roughly the same time. This can be done elegantly by having a higher-priority "set-up" animation playing, allowing the lower-priority actual animation to be reset invisibly, then upon stopping the "set-up" animation things /should/ be in-sync. However there is as always no guarantee on this, as the animation could be slow to download, or if another person comes near then they will not have the benefit of the re-syncing so animations will be playing out of sequence. I've made the following JIRA proposal for a function to hopefully correct this, but I'm also interested to hear what others have done to try and avoid this issue. https://jira.secondlife.com/browse/SVC-4897
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|
Yingzi Xue
Registered User
Join date: 11 Jun 2008
Posts: 144
|
10-09-2009 03:14
This may not apply per se, but I've found if you send a message from one script to others, they tend to all receive the message and process it at the same time. It works pretty well, but it's not perfect; there can be deviation sometimes. I've used this method for a club lighting system and the lights stay in sync with no noticeable lag. I've not worked with animations, but I would assume it would work the same. You can't control client-side lag though.
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
10-09-2009 03:28
From: Yingzi Xue This may not apply per se, but I've found if you send a message from one script to others, they tend to all receive the message and process it at the same time. It works pretty well, but it's not perfect; there can be deviation sometimes. I've used this method for a club lighting system and the lights stay in sync with no noticeable lag. I've not worked with animations, but I would assume it would work the same. You can't control client-side lag though. Yeah, link-messages do execute pretty much simultaneously, or near enough as to not matter. So long as the listen() or link_message() event isn't bogged down looking for a million other messages as well, or the sync message is handled first, then it can respond with a good degree of immediacy. However, the main difference between a lighting system and animations is that the animation starts playing at the time that it finishes downloading, whereas a lighting system is synchronised to a degree by the fact that all of its values are handled server-side, so it will only go out of sync if a client doesn't receive an update. But in this case they will be in-sync again as soon as another update comes through. With animations the script has no way of determining whether the animation is downloaded yet, and so scripters can only make an assumption that the animations will be available in say...2 seconds, and restart them after this time to "re-sync" them.
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|