4 ms·
Interesting. Linden Lab went through a period when they envisioned a 3D web, where the same client would talk to multiple virtual worlds. Around 2011, they bac
by Animats 5y ago
Interesting.
Linden Lab went through a period when they envisioned a 3D web, where the same client would talk to multiple virtual worlds. Around 2011, they backed off on that. But others went on, and to the surprise of Linden Lab, Open Simulator was developed. The Second Life simulator is proprietary, while the client is open source. Both are in C++. Open Simulator is in C#, and it's roughly compatible, although totally different internally.
I've been writing a Second Life / Open Simulator client in Rust for the last year or so, so I know the wire protocol. VWRAP seems to be an attempt to define a more portable wire protocol with roughly the same information.
The current Second Life wire protocol has two parts, events via binary UDP messages, and assets via HTTP. The UDP message formats are defined here.[1] This is a painful system. Both ends have to use exactly the same message template file, because messages do not contain length information. You have to parse each message perfectly just to find the next message. This makes adding new messages very difficult. No new messages have been added in years. That's one problem VWRAP was intended to solve.
Assets come in from ordinary web-type servers, and complex ones are encapsulated in Linden Lab Serial Data Protocol, which is documented and has multiple implementations. Those are reasonably straightforward to deal with.
The conceptual problems of interoperability are much tougher. There are some metaverse standards organizations starting up, but they're working more on diversity, inclusion, and safety than wire protocols. Content standardization is making progress. Content standardization seems to be settling on some subset of GLTF/USD formats. NVidia is pushing that, and the major tools (Maya, Blender, Unity, Unreal) all speak it. That's a file format, not a wire protocol.
Enough standardization to allow portals between virtual worlds would be a big win. There's talk about this, but not much is happening, except in the Open Simulator ecosystem, where it works now.
One company, Ready Player Me, has an interesting concept - outsourced avatars. Avatars are created on the Ready Player Me site. Cooperating games have a module which renders such avatars, going out to Ready Player Me for the assets. This gives Ready Player Me a lock on avatar appearance and wearable items. For now, this is free. For now. "Wolf3D has the right to amend the Terms unilaterally." Some smaller games are using this, but the big studios have mostly stayed away. If that catches on, those guys have control over the air supply of the Metaverse.
[1] https://vcs.firestormviewer.org/phoenix-firestorm/files/tip/scripts/messages/message_template.msg?at=tip https://vcs.firestormviewer.org/phoenix-firestorm/files/tip/...
- noduerme 5y agoI'm curious why they would have chosen to make their UDP messaging so inflexible. Is it just because it was written when bandwidth was so scarce they couldn't afford to reserve a couple bytes for length and start/termination?
- dingosity 5y agoGames programmers in the 90s had this belief that UDP was faster than TCP. And in some cases it was. I don't think there was a standard way to change your stack's behavior for startup and congestion back then (we have CUBIC, BIC, FAST START and all sorts of options now.) The commonly held belief was that if you want speed, you have to use UDP. But then the first thing people do is they re-implement TCP poorly at the application layer to get fragmentation, reliability, windowing or large datagrams. OGP and "Assets Over HTTP" were introduced later and used TCP to carry some of the application protocol, but by the time they came around, UDP was wedged very far up in the application code and it was difficult to get it all out. I haven't looked at the SL Viewer code in over a decade. Maybe it's better now.
- rdw 5y agoIt's still true that UDP is necessary for realtime communication. I recently worked on an MMO project in which a sub-team attempted to use TCP as the main layer, but ran into huge issues, all of which were cured by switching to UDP. TCP is good at what it's good at, but nearly every realtime audio and video protocol is gonna keep using UDP. You have to be able to ignore dropped packets instead of blocking the entire channel waiting for a full RTT, it very quickly spirals out of control. Of course, TCP is a much better protocol for infrequent and request/response type interactions, so while I was at Linden we converted as much traffic as possible to TCP/XML. But a lot of the "realtime" stuff like object updates had to remain UDP, for empirical reasons. Second Life didn't reimplement fragmentation -- messages just got truncated if they went over the MTU, lol.
- dingosity 5y agoUDP is not required for real-time communication. I have 5k+ concurrent channels of RTP over TLS (not DTLS) going most of the day. If you solved a throughput problem by switching from TCP to UDP, it means you had a middle-box doing bad things. TCP is not slow unless you encounter congestion or packet loss. But you have to deal with those problems if you're sending data over UDP. When I was at Linden, we activated fast start and bic on ADITI when testing OGP and Assets over HTTP and things worked MUCH BETTER.