Iceworld issues on DI + General advice for Age writers
Posted: Mon Jul 06, 2015 11:16 am
Recently, it has been brought to my attention that some people are having issues accessing Iceworld on Deep Island. The issue that I noticed is, I believe, not at all restricted to Iceworld, so I'd like to use this opportunity to bring it to all you age writers' attention. Unfortunately, we are currently in a situation where it's already hard enough to build an age for Uru, that it's a pure wonder that people are still doing it. (Thanks a lot for that!) Naturally, most of these ages are only tested by their authors in the offline game, so they are built with little consideration for Shards. I certainly can't blame their authors for that! I'd just like to bring one particular property of how Shards work to your attention, so that you can make your ages work better on them. I'm sorry this gets a bit lengthy, but the issue needs some introduction to be understandable.
When the age is running online, Uru is uses a system called "SDL" to synchronize the age state between all the people visiting it. Some of you may have encountered SDL when you wrote SDL files for your age, and manipulated the SDL through Python, or by re-using existing Python mods. If you change the SDL through Python, your client tells the server, and the server tells all the other clients, and then everybody knows that some door just opened. Even better, the server remembers this, so someone new joining in will immediately be told that the door is open. So far, so good.
However, SDL is also used by Uru to synchronize animations, making sure that everybody sees the animated objects in the same position. When people join an age, the SDL is synchronized between client and server, and Uru does this using a single message for every SDL record. The SDL file you write is one SDL record, but every single animation also gets an SDL record. That means if you have 100 animations, your client will exchange 100 packages with the server! And to make things worse, the Uru client is pretty dump in doing that, and it neglects all its other duties during the sending. For hundreds of animations, this can quickly take several seconds. The result is that the client "forgets" telling the server in time that it received some data, so the server thinks the client is gone, and closes the connection. Ouch.
This is what happens in Iceworld. In the case of this particular player, the client sends 275 (!) SDL messages to the server. That takes 5 seconds. That's the maximum delay the server accepts between the server telling the client "here's your data", and the client saying "okay, got it" - so the client is kicked. Now, the client is not even done yet sending SDL messages, so it may well be that much more than 275 messages have to be sent.
So, what can be done? Do we have to remove all these nice animations? No! Many of these animations will be just decoration. If you have some flame, shown as animated texture, it doesn't matter whether the animation of the texture is synchronized between everybody looking at it. If somebody is, like, 5 seconds "ahead" in the animation - how are they even going to notice? For such animations, it is possible to tell Uru not to synchronize the animation, and then no SDL object will be created, and less messages have to be sent.
Now, unfortunately, I have no idea how to build an age. So I don't know which buttons you have to press in Blender or 3ds Max to set this flag. It's probably something about synchronization. PyPRP developers, which Blender button did you wire that flag to? (I hope it is wired to something^^). And 3ds Max users, is there anywhere in the properties of animations and/or objects some kind of synchronization checkbox you can tick/untick? Please tell us, so we can collect this here. even better, we should collect it in the Wiki. I just wonder what would be the best place for a collection of "things to consider to make your age working better online, that you'll not notice when you test offline".
When the age is running online, Uru is uses a system called "SDL" to synchronize the age state between all the people visiting it. Some of you may have encountered SDL when you wrote SDL files for your age, and manipulated the SDL through Python, or by re-using existing Python mods. If you change the SDL through Python, your client tells the server, and the server tells all the other clients, and then everybody knows that some door just opened. Even better, the server remembers this, so someone new joining in will immediately be told that the door is open. So far, so good.
However, SDL is also used by Uru to synchronize animations, making sure that everybody sees the animated objects in the same position. When people join an age, the SDL is synchronized between client and server, and Uru does this using a single message for every SDL record. The SDL file you write is one SDL record, but every single animation also gets an SDL record. That means if you have 100 animations, your client will exchange 100 packages with the server! And to make things worse, the Uru client is pretty dump in doing that, and it neglects all its other duties during the sending. For hundreds of animations, this can quickly take several seconds. The result is that the client "forgets" telling the server in time that it received some data, so the server thinks the client is gone, and closes the connection. Ouch.
This is what happens in Iceworld. In the case of this particular player, the client sends 275 (!) SDL messages to the server. That takes 5 seconds. That's the maximum delay the server accepts between the server telling the client "here's your data", and the client saying "okay, got it" - so the client is kicked. Now, the client is not even done yet sending SDL messages, so it may well be that much more than 275 messages have to be sent.
So, what can be done? Do we have to remove all these nice animations? No! Many of these animations will be just decoration. If you have some flame, shown as animated texture, it doesn't matter whether the animation of the texture is synchronized between everybody looking at it. If somebody is, like, 5 seconds "ahead" in the animation - how are they even going to notice? For such animations, it is possible to tell Uru not to synchronize the animation, and then no SDL object will be created, and less messages have to be sent.
Now, unfortunately, I have no idea how to build an age. So I don't know which buttons you have to press in Blender or 3ds Max to set this flag. It's probably something about synchronization. PyPRP developers, which Blender button did you wire that flag to? (I hope it is wired to something^^). And 3ds Max users, is there anywhere in the properties of animations and/or objects some kind of synchronization checkbox you can tick/untick? Please tell us, so we can collect this here. even better, we should collect it in the Wiki. I just wonder what would be the best place for a collection of "things to consider to make your age working better online, that you'll not notice when you test offline".