"Dimensions" via Cross Server Hack

Post Reply
warped_speed
New member
Posts: 5
Joined: Fri May 19, 2023 19:45

"Dimensions" via Cross Server Hack

by warped_speed » Post

It is not necessary to implement "dimensions" or "realms" the same way it is done in Minceraft. Rather, we can cross-link the servers to work together, by making a few simple changes in a few key areas to add the necessary interoperability functionality. The amount of work needed would obviously be much less than what would be needed to reliably make Minetest load multiple world database files in the same process.

A teleportation point could serve as an example. A teleportation point at Server A can have a button for another teleportation point at Server B, when clicked, Server B is instructed to put the player in a table showing which portal they should appear at, then the player is kicked from Server A with the message "join Server B" (alternatively, the client program itself is instructed to do so, but that function don't exist yet).

When the player arrives, Server B checks the table for the destination portal (if empty, they just joined, so let them spawn naturally). Using filesystem trickery, the inventory is either copied or linked between all of the participating servers (also if empty, they just joined). Some code prevents a single username from logging in at more than one server in their system, in order to prevent duplication of items via the linked inventory data. The servers must use an identical set of itemstrings for all obtainable items, but the unobtainable items and nodes can be completely different because they will never moving between servers anyways.

When the player returns, Server B puts the username and their destination in the table for Server A, right before forcing them to join Server A, which then reads the destination and puts the player there immediately when they arrive, by the same exact process that Server A used to "send" the player to Server B.

All that's left is to devise ways to:
-> send the player's destination to the next server
-> disconnect the client while making them connect to the next server
-> copy inventory data between servers
-> enforce disallow same username to join more than one linked sub-server at once

There are simple dirty ways to implement this, like kicking the player with "access denied reason: join the other server" and other tricks like that, and even though there are better ways to code it in, we could at least start from that and use it to demonstrate the other features that would make it work.
Carbon is Essential. Geoengineering is a real threat to life on Earth. Stop the Spraying!

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Cross-server hack? Nope, proxy it

by Blockhead » Post

This is not the first time someone has proposed this kind of methodology for dimensions, cross-server player sharing, federation or however you phrase it, even it is possibly the most detailed. Talk is cheap and unless you're the first to implement this, it's still just sitting on the ideas pile like it was already.

Here are previous discussions of this type of technology:
If you read the closed GitHub threads, you will see there is no core dev support to put this on the roadmap. So you're going to have to do it yourself or contract someone else if you want it.

I also think this is the wrong solution for dimensions. It *may* be the right solution for small networks of federated servers where each server trusts the other and wants to let players travel between them.

For dimensions and hub-and-spoke server networks, I think the best solution is to copy technology from what's used in Minecraft servers. The big players in Minecraft server operators, mod authors and so on know what they are doing - they're using that knowledge to make more money than Minetest. BungeeCord is a proxy that seamlessly forwards the player's connection to one of several servers. This requires no change to the client. It enables a server network with a few hundred players, each on different dimensions, worlds, minigames and so on, to connect to "the same" server while actually being able to scale hardware horizontally. Now I haven't heard anyone propose that for Minetest...
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
SegFault22
Member
Posts: 872
Joined: Mon May 21, 2012 03:17
Location: NaN

Re: "Dimensions" via Cross Server Hack

by SegFault22 » Post

BungeeCord does not require any change to the client because the interdimensional transport functionality already exists there, that is something Minetest simply don't got. Perhaps the proper way would be to start sending mapblocks from the other server at the same time the player pos is updated to their new location at the other server, avoiding the need to "splash dirt across the screen" like minecraft, and avoiding the need to change the client. The server code would need to be changed a lot to make it work, though.

But as long as we keep looking at Minecraft as the goose that lays the golden egg, we will never need dimensions anyways. And as long as there are more servers online than players online, the community will remain stagnant. Adding more servers this way will only make it appear that the players are distributed more sparsely.

Interestingly, the proxy would indicate a number of players online that is the sum of the individual servers in the network.

BungeeTest is likely to become a new project soon.

update1: if the player pos does not have to move to another mapblock, there could be issues with loading. The proxy should send the client a content_ignore mapblock for any they have currently loaded, update their pos, then send the new mapblocks. That way they don't get moved into lava before the new mapblocks arrive.

update2: if I have to do it myself, thats fine. we just have to work on marketing to get more players. perhaps we can give vote crate kits and/or donor rank perks? of course votifier is another monster all on its own though, so maybe I should start there...

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: "Dimensions" via Cross Server Hack

by Blockhead » Post

Follow up to my earlier suggestion of a proxy. Apparently the devs behind Himbeerserver created this using modchannels and RUDP and go and stuff. Doesn't seem to need anything more than a mod on the server and a daemon to run the reverse proxy software which is written in Go.

mt-multiserver-proxy

I haven't tried it, and Himbeerserver seems to have disappeared. But I stand corrected about whether anyone had tried a proxy (technically, reverse proxy) architecture for multiple servers.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Astrobe
Member
Posts: 571
Joined: Sun Apr 01, 2018 10:46

Re: "Dimensions" via Cross Server Hack

by Astrobe » Post

A fascinating topic. Some requests actually lean towards replication, while others lean towards federation, and they are different beasts.

If we talk about federation, MT's HTTP API (HTTPS preferably) should let servers exchange information about players as OP sketched. In my opinion the most valuable feature is sharing inventories or items between servers. I believe it has already be done before. Perhaps one can construct this way some sort of inter-server "void chest".

But then how do you make sure a server has fresh enough information so as to prevent item duplication exploits or bugs? You find yourself reading the works of an award-winning researcher and visiting the zoo of logic clocks
My game? It's Minefall.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests