in this video, we give an introduction to colyseus which is a gaming server popular in the metaverse with platforms such as decentraland.
in this example we show how you can build your own colyseus server with javascript, node.js and websockets.
In particular we build the barebones of a social terminal where every participant can see real-time every keystroke typed in the terminal as well as being able to type their own messages. to implement this we create a terminal using xterm.js a popular web terminal module used by vscode and hyper.
at the end of this video you should understand how game engines such as colyseus will be powerful in the metaverse to manage game or world state, chat or any social experiences and you'll be able to use it for your solutions, as you will have built your own solution.
code is available at https://github.com/chrishayuk/hello-c...
00:00 - why game engines are important in the metaverse
02:27 - creating a colyseus.js server
07:22 - introduction to xterm.js
08:13 - creating an xterm.js terminal
12:28 - hosting xterm.js and colyseus on the same server
13:46 - using express and middleware to host xterm.js and colyseus together
20:20 - establishing a websocket connection between xterm.js and colyseus
26:08 - extending colyseus with custom rooms types
27:46 - logging out on colyseus server when a room is created or destroyed
30:15 - handling sessions joining or leaving rooms in colyseus
33:06 - broadcast joing leaving rooms to other room participants
36:34 - broadcast messages to others in the chat room
40:19 - sending keyboard input from the xterm.js to colyseus
42:34 - the social terminal
45:14 - conclusion
Watch video introduction to colyseus and xterm.js - building a social terminal in javascript and node.js online without registration, duration hours minute second in high quality. This video was added by user Chris Hay 30 May 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,156 once and liked it 92 people.