mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Draft FAQ - Adding more FAQs from Discord. (#2504)
* Draft FAQ * Update FAQ.md * Update FAQ.md * Update FAQ.md * Update FAQ.md * Update FAQ.md * Update FAQ.md * Update FAQ.md
This commit is contained in:
parent
41480ac42f
commit
220c98a25e
@ -78,3 +78,48 @@ Anything to add to this list? Please make a PR or ask in the discord.
|
||||
|
||||
An alternative to the above is to use a dedicated server (vps) or use a relay.
|
||||
</details>
|
||||
|
||||
|
||||
### Host Migration
|
||||
|
||||
<details>
|
||||
<summary>Host migration alternatives and work-around.</summary>
|
||||
|
||||
Host migration as of writing is not built into Mirror, and it is best to avoid Host Migration completely if you can.
|
||||
Below are some tips as to why, and how you can add a host migration-like alternative.
|
||||
- Dedicated hosts should rarely ever be closed (If you are doing games that need to stay open such as MMO's).
|
||||
- Short arena maps, take players back to the games list/matchmaker, so they can just join another, nice and simple.
|
||||
|
||||
The work around is to basically fake the host migration, store info of a backup host on players game, upon disconnection, reconnect everyone in the game to that new host, then restore positions and variable data back to how it was before the original host dissappeared.
|
||||
- Test players connections when they join, find one with unblocked ports, and decent ping/latency.
|
||||
- Send this players data (IP and Port) on all connected players games.
|
||||
- Save various player info, either locally or on that backup host, such as player positions, health etc
|
||||
- Upon disconnection from server, call a function to connect to the backup hoster StartClient( BackupIP - BackupPort ).
|
||||
- As the scenes will most likely reset, along with players respawning, you now need to set player position back to your stored one that was saved either via checkpoints, or in the disconnect detection callback.
|
||||
- Cover all this up with a UI, saying please wait (optional, should happen in the blink of an eye).
|
||||
|
||||
Depending on what your game is like, it'll either be easy or difficult to add the work-around.
|
||||
An example of these are:
|
||||
- (easier) A game only needing player position data such as "Fall Guys".
|
||||
- (difficult) Forge of Empires, a game where created objects are placed, soldiers, vehicles, various other crafts and upgrades, all with their own levels/stats.
|
||||
|
||||
</details>
|
||||
|
||||
### Master / List Servers and Simple Matchmaker
|
||||
|
||||
<details>
|
||||
<summary>A database of world-wide registered host data.</summary>
|
||||
|
||||
All the hosts, dedicated or player hosts, get added into a list database, players get the list and can choose who to join.
|
||||
Using a list server means players do not have to manually enter IP addresses and Ports, it is all done behind the scenes, and works for localhost, LAN, and WAN connection types.
|
||||
You can show as much, or as little data as you like to the players, such as host name, type (deathmatch), player count (45 / 50), ping, enemy difficulty, map, region etc
|
||||
|
||||
- Mirror Listserver: Mirror squad manage and host this for you, you pay monthly subscription, but do not have to worry about setting up or maintaining it.
|
||||
- Node ListServer: Free, but you host the files yourself on an unblocked PC, like a VPS. Has a wide variety of customisable features, best option if you are using dedicated hosted games.
|
||||
- Dark Reflective Mirror: This is a list server and a relay, it is free, but you host and manage the files yourself.
|
||||
Relays offer an unblocked route of traffic, but at the cost of extra latency/increased ping. This relay will test for a direct connection first, then fallback to routed traffic if that fails. Both the list server and relayed traffic is optional, you can use one part, and not the other.
|
||||
This is the best option for player hosted games, where router port blocks are common.
|
||||
|
||||
Simple Matchmaker
|
||||
- You can make matchmakers out of these list servers, simply hide the list to players, have them auto join a game with space. You could also filter out various requirements the player has set, for example, "USA" Region only, or "Lava Island" map.
|
||||
</details>
|
||||
|
Loading…
Reference in New Issue
Block a user