Modal Title
Frontend Development / Open Source

Third Room Teases User-Generated Content for the Metaverse

The creators of Matrix, an open source chat network, have jumped into the metaverse with Third Room — a web-based client with a UGC editor.
Oct 20th, 2022 7:25am by
Featued image for: Third Room Teases User-Generated Content for the Metaverse
Image via Third Room

“It reminds me of the feeling when Netscape first added JavaScript to the web.” So says Matthew Hodgson, the creator of the Matrix network and now building a web-based metaverse client called Third Room. He thinks he and his team have cracked the solution to creating user-generated content (UGC) for the metaverse.

Last August I profiled Matrix, a decentralized chat network providing an alternative to commercial instant messenger (IM) products like Slack and Meta’s WhatsApp. Since that time, Matrix has continued to grow — it now has 72 million users on the Matrix network (total users, not active) and about 100,000 servers. The network is “roughly tripling in size every year” according to Hodgson, in an interview with The New Stack.

But as we know, time moves fast on the internet and new paradigms emerge for communication and socializing online. After being just a glint in Mark Zuckerberg’s eye in 2021, the metaverse is now one of the most hyped paradigm shifts. Like the Meta founder, Hodgson has decided to jump into the virtual world — and with both feet. “Our avatars even have legs, which apparently is completely revolutionary,” he told me in his droll British accent.

Third Room, which was created by by Robert Long (formerly of Mozilla Hubs, and before that Altspace VR), promises “open, decentralised, immersive worlds built on Matrix.” Just as Matrix appeals to internet users concerned about privacy and big tech power, Third Room asks us to “imagine a metaverse free from Meta and Facebook where your data isn’t mined and sold to the highest bidder.” Like Matrix, Third Room has “end-to-end encryption.” And just to prove that all forms of commercialization are verboten, cryptocurrencies and NFTs are not part of the Third Room vision.

Third Room Compared to Croquet

Hodgson explained that Third Room “is entirely running in WebGL on a web browser, using a new game engine that we’ve written called Manifold, based on Three.js, which gives just ludicrously good performance.” The product also uses the bitECS entity component system and the Rapier physics engine, and it connects to Matrix via its Hydrogen SDK to provide Matrix chat and VoIP features.

Third Room

Third Room; image via its website

When Hodgson demoed Third Room to me, it reminded me of the demo of Croquet that I saw back in May — another web-based virtual world. The two products have obvious things in common; both are built on WebGL, Three.js and Rapier. Hodgson also said the original vision for Croquet, conceived by David A. Smith and Alan Kay back in the 1990s and early 2000s, was an inspiration for Third Room.

“Conceptually, this [Third Room] is quite similar to the original Croquet vision that Alan Kay and co came up with, back in the day, of Smalltalk objects which are distributed over the network, and you basically have an infinite canvas for building richer experiences. And honestly, it was quite an inspiration for doing it this way.”

An upcoming new feature of Third Room is an in-world editor, which will enable developers to directly manipulate virtual objects inside Third Room itself. In other words, a separate authoring environment won’t be required. This project is still in its early stages though; for the meantime, Third Room is using Unity to author worlds and has published an exporter to support this.

Croquet’s approach is to have a separate IDE called the Microverse IDE — although this too has an “in-world text editor.”

UGC for the Metaverse

One of the unknowns in the metaverse is how ordinary people will create content in it — a.k.a. user-generated content (UGC). In today’s web, people use blogs and social media apps like Facebook, YouTube and TikTok to create content. There’s been a lot of chatter this year that generative AI software will enable people to easily create 3D content for use in the metaverse. That may well happen, but in the meantime, the Matrix team is working on its own solution for Third Room.

Hodgson wants the in-world editing controls in Third Room to be used to create UGC. His colleague Robert Long is running this project.

“We’re currently hard at work on this,” he said, “using Wasm sandboxes as the underlying execution environment for UGC, with QuickJS as one UGC scripting environment layered on top (or alternatively Rust, Zig, C, or anything else that can compile down to Wasm). The sandbox will expose at least a scenegraph API to let the UGC manipulate the glTF that makes up the world directly.”

Hodgson says Third Room will be releasing the scenegraph API as an open standard, “tentatively called WebSceneGraph or WebSG.” He added that it won’t be specific to Third Room or the Manifold game engine.

While I was writing this article, Hodgson emailed me back to excitedly tell me that “we got the [Wasm] engine working and the first ever piece of UGC in Third Room went live.” You can see the short animation below.

He also included a code snippet, along with further explanation:

“It’s defining a little fragment of JavaScript as a string, which grabs a node from the WebSG glTF scene, positions it, and spins it,” he explained. “And then we load that script as JS into the UGC engine, and hey presto: the world is scripted.”

He added, “It’s the first time we’ve had arbitrary sandboxed scriptable functionality that clients can execute themselves. It reminds me of the feeling when Netscape first added JavaScript to the Web. The next step is clearly to implement a simple in-world IDE using the same primitives, and then everyone can go wild building UGC.”

The Web’s Place in the Metaverse

One of my hobby horses is ensuring that the web is always part of the conversation when it comes to the metaverse, since some of the primary vendors (like Meta and Epic Games) rarely mention web technologies.

Unsurprisingly, Hodgson is bullish on the web. He thinks companies like Meta and Epic Games are aiming for “pure vendor lock.”

“They want people to be locked into a binary app, which is their walled garden,” he said. “And also they seem to be bizarrely obsessed with VR, whereas in practice the hardware is still not there. Whereas an experience inside a web browser window is great. If you look at the successful metaverses that exist today, whether it’s Roblox or Minecraft, VR is very much a kind of weird optional experimental thing; and I’m just baffled as to why Meta bet the farm on it.”

If the metaverse is going to be the next big platform on the internet, then Hodgson wants there to be decentralized, open source versions of communications software on it — just as Matrix is for the current web.

“The reason we built Matrix was to fight the walled gardens for instant messaging and VoIP and provide an open communication for the web. And we see the whole thing potentially happening again before our eyes [with metaverse], with the exception that we’re actually in the game from the outset. And in fact, we’re arguably ahead of some of the gatekeepers for once.”

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.