Spacetime-Meta / spacetime-sdk

The spacetime-sdk is a turnkey virtual environment package for building in the Spacetime Metaverse
https://www.spacetimemeta.io/metaverse/spawn-planet
MIT License
11 stars 2 forks source link

Multiplayer Part 2 (Client-Server) #187

Closed Liquid-Blocks closed 2 years ago

Liquid-Blocks commented 2 years ago

Overview

For a fluid multiplayer experience of 5+ players we need client-server multiplayer.

There are a few advantages to doing this:

  1. This will also allow developers to create competitive games using the spacetime-sdk since the server will be able to monitor cheating.
  2. Users wont have to enter a peer id to connect to other users.
  3. Faster on long distance

Downsides of server-client

  1. Someone must host the server. As spacetime get more users, hosting the servers might become expensive.
  2. harder to deploy. If the basic world now requires a server, it will be harder for the average people to deploy an environment.

Specifications

Anything else?

This issue will take a long time to complete and will probably be broken down into smaller issues

Liquid-Blocks commented 2 years ago

The sdk was updated and can now optionally connect to a server.

When creating the world, you now have the option to do a serverless page like the base template or can deploy the full spacetime-sdk to a server for a faster multiplayer experience. The spawn planet was updated to a full server deploy.

To avoid confusion in this update, the peer to peer multiplayer is automatically hidden behind and option toggle when the page connects to a server.