Saturday, September 17, 2022
Should the metaverse be written in Javascript?
“In the lingo, this imaginary place is known as the Metaverse. Hiro spends a lot of time in the Metaverse. It beats the shit out of the U-Stor-It.”
~ Neil Stephenson, Snow Crash
What is the metaverse actually?
The term "metaverse" first appeared in Neil Stephenson's novel Snow Crash in 1992. It was depicted as an virtual alternative reality. You enter with an avatar and can explore a digital world with different laws and rules. Hiro, Snow Crash's protagonist, is a hacker who has built parts of the metaverse. In the real world he shares a 20 by 30 storage unit with a roommate. But in the metaverse he lives in a mansion.
“When Hiro first saw this place, ten years ago, the monorail hadn't been written yet; he and his buddies had to write car and motorcycle software in order to get around. They would take their software out and race it in the black desert of the electronic night.”
~ Neil Stephenson, Snow Crash
The metaverse has since evolved from just being inside a sci-fi novel. Right now there are many companies racing for metaverse dominance. Microsoft, Meta, Apple and Google are all trying to suck up good developers and creating their versions of the metaverse.
A peoples metaverse
However some people (including myself), would argue that the best experience would have to come from an open source decentralized metaverse. One open for extension by anyone. Chaotic, but honest.
Neil Stephenson himself is also a supporter of an open and decentralized metaverse. In fact he recently anounced Lamina1, a decentralized layer 1 solution for building an open metaverse on top of the blockchain. Providing a base for developers to build upon.
Everything Javascript
Now, why would Javascript be a good candidate of building on the metaverse. Well for starters Javascript is the most commonly used programming language. Originally created for the web, but nowadays used for just about everything. Whether it's writing a backend in Deno or Node, doing machine learning with TensorFlow.js or building mobile applications in React Native.
But could it do something like create 3d worlds for a metaverse? It sure can! Meet ThreeJS, another great open source addition to the Javascript universe. It uses WebGL to render 3d in the browser. People are already building games, gorgeous websites and NFT art galleries with ThreeJS.
You can check out a simple ThreeJS model rendering project I built here.
Who knows what the future will bring. Perhaps we will in fact live in 20 by 30 storage units, unhappy in the real world and finding relief in the metaverse. One thing I do know, I would rather hang out in a decentralized metaverse built by a community of Javascript developers then Mark Zuckerbergs Meta.
Let's end with another great Snow Crash excerpt.
"See the world is full of things more powerfull than us. But if you know how to catch a ride, you can go places."
~ Neil Stephenson, Snow Crash