Inventory problems can be about network lags, I still optimize game, in new versions it should be better.
I use NodeJS WebSocket (ws) library for backend side. You can communicate client and server over websocket connections.
For client you don’t need any other library. I was using socket.io since then, but now I can work with vanilla websockets too. Maybe for beginning you would prefer socket.io.
Making game public is easy. There are hosting services or dedicated servers that provides disk spaces and servers and public IP address. Please check out Heroku for that. They have free plans, you could test and see how it works. You’ll be simply using git to deploy your game to a public env.
For domain part, go to Godaddy.com buy a domain for your game. Then go to Cloudflare, they also have free plan. Connect your domain to cloudflare (that will provide you SSL and a DNS interface, so you could connect your IP to your domain over Cloudflare service)
When you enter your domain on browser, it will automatically connect to your IP and serve your static files. Like you test your game on PlayCanvas test URL, your users will be able to play your game on your domain.
There are plenty of tutorials on web that shows you how to do that thing step by step. If you need search terms, please try these : How to build website on Heroku, how to buy domain on Goddady, Cloudflare setup etc.
Also, making a multiplayer game can be confusing at the beginning. But after you understand some basic concepts you get familiar all parts of it.
On multiplayer games there is always a host and there are clients. All clients are basically connected to server, they send some info to server, and server broadcasts these informations to other clients, so users can see what you do, where you at etc. With this way, all clients are synced thanks to server.
You’ll be sending some important details, like player’s positions, rotations and use these datas to render world.
I’ll give you an example ;
- I connect a server
- You connect a server
- My client sends an information about my current position, like this : x : 10, y : 0, z : 10
- This data goes to server and server sends this information to you, not me
- Once your client gets that information from “server”, not from my client, it renders me in your client, simply clone a player (entity) and triggers setPosition(10, 0, 10); to put me correct position on your client.
This simple concept will you give you the idea of multiplayer. We are not really in your client, but with some functionalities we show all clients to each other and that provides such an amazing experience.