The metaverse needs to be simulated on servers. Or maybe you can make it work peer to peer — but it can’t run just in the client.

When I set out to build SceneVR, I started with one goal — let people build multiplayer experiences using javascript. I’m a big fan of Second Life, I think they built an amazing piece of technology, way back in 2003 — but the one thing I really don’t like about SL is LindenScript. It’s a weird language, not used anywhere else on the web, and with a strange programming model. Personally, I like Javascript, so I wanted to make a 3d world where you could use javascript to make your world.

Why do I need a scripting language in my 3d world?

You might be wondering why you need a scripting language at all? It’s so that you can have interactions in your scenes. When I walk up to a door and touch the door handle, the door needs to open for me, and for anyone else who is connected to the same scene at the same time. And the easiest way is to do that is in code:

door.click((e) => {

door.animate({ rotation: ‘0 90deg 0’ });

});

With those three lines of code, you’ve made a door that will animate open when you click it. I think that’s a pretty exciting way to start building the metaverse, with a programming language that hundreds of thousands of kids learn at school, a language that millions of web developers are experienced and confident with.

What does it mean to simulate the metaverse?

The metaverse should be consistent. That means that everyone sees the same view of the world at the same time. For consistency, the easiest and most common way, is to have a server that simulates the world, it takes everyones actions and runs them in one place, against one world, then tells everyone what is happening.

This is what SceneVR does.

A server written in node.js accepts websocket connections from players. As players move around the world, they send their actions to the server. The server gets these events, and simulates what will happen when they interact with things. So if you stand on a touch sensitive object, or click on a link, or touch a chess piece, a small bit of code runs on the server, and the server simulates what should happen.

Will we need millions of servers for a large scale 3d world?

Yes, probably.

There are ways to solve this. We can only simulate the parts of the world that people are in (this is what SceneVR does at the moment, with on-demand servers).

Also, if you are only exploring the world with your friends, you could run a server for your friends, and simulate the world for them. It could be possible that you could run a server in the browser, and your friends connect to you over WebRTC, then you wouldn’t even need to run any software to provide a small walled-off-metaverse that you and your friends could share.

But, coming back to the current web, we already have tens of millions of servers running the web, serving PHP, C#, Ruby and Python sites. Firing up a few thousand servers to serve the nascent metaverse shouldn’t put people off creating server-powered 3d worlds.

How we scale up the metaverse to hundreds of millions of users is a problem to be solved, but there are currently only five million cardboard viewers out there, we have a year or two before we have to create a virtual home for the 1.6 billion facebook users. If you want to see our journey to build the metaverse, follow us on twitter @scenevr.