P2P

dark_s0ul
New member
 
Posts: 5
Joined: Mon Sep 02, 2019 05:54
GitHub: max-pasichnyk

P2P

by dark_s0ul » Mon Sep 02, 2019 05:57

Does minetest support peer to peer, and if not, how far can it be implemented?
 

User avatar
Yvanhoe
Member
 
Posts: 121
Joined: Fri Jul 05, 2019 03:18
Location: Japan

Re: P2P

by Yvanhoe » Mon Sep 02, 2019 06:26

What would p2p be used for ? I could see it being useful in the context of the public remote media server but I don't really see other cases.
 

dark_s0ul
New member
 
Posts: 5
Joined: Mon Sep 02, 2019 05:54
GitHub: max-pasichnyk

Re: P2P

by dark_s0ul » Mon Sep 02, 2019 06:37

I mean use p2p instead of client-server architecture for multiplayer
 

User avatar
mcbits
Member
 
Posts: 10
Joined: Sat Aug 17, 2019 11:58
GitHub: mcbits

Re: P2P

by mcbits » Mon Sep 02, 2019 07:05

I'm pretty sure that fully decentralized, real-time, open world gameplay is still uncharted territory.

One thing Minetest could do in theory is host static assets (3D models, textures, sounds) on a p2p platform like IPFS, which would relieve some of the load on a popular server with a lot of new players connecting with empty caches. But the savings wouldn't be much compared to the ongoing gameplay data unless a game's assets amounted to hundreds of megabytes or gigabytes, which won't ever be practical until Minetest supports loading content during gameplay instead of all at once when the client first connects.
 

User avatar
Yvanhoe
Member
 
Posts: 121
Joined: Fri Jul 05, 2019 03:18
Location: Japan

Re: P2P

by Yvanhoe » Mon Sep 02, 2019 08:05

dark_s0ul wrote:I mean use p2p instead of client-server architecture for multiplayer

Oh please, not that dead horse again...

You are free to experiment, but really in the case of MT, this looks like a solution looking for a problem. You need to maintain consensus over the state of the world. It is easier to do that in a central place than in a network of clients with no central authority. I am not aware of any consensus algorithm that can beat the latency of a classic client/server architecture.
 

User avatar
texmex
Member
 
Posts: 1537
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: P2P

by texmex » Mon Sep 02, 2019 14:33

Yvanhoe wrote:I am not aware of any consensus algorithm that can beat the latency of a classic client/server architecture.

Hmm, what about a Mesecoin based, fossile fueled, GPU-accellerated (it's not like MT takes advantage of the GPU anyway) proof-of-voxel for that delicious carbon release goodness? ;)
 

dark_s0ul
New member
 
Posts: 5
Joined: Mon Sep 02, 2019 05:54
GitHub: max-pasichnyk

Re: P2P

by dark_s0ul » Tue Sep 03, 2019 10:42

What about determinated chunk generation, that looks same on different devices, and not depends on direction of moving of the players?
I'm trying to do that, but the main problem, is that generation depends on direction of moving.
On some devices I can get huge massive of the trees, and small lake, but on other devices I can get huge lake and a few trees.
There is any ideas how it can be implemented?
 

User avatar
texmex
Member
 
Posts: 1537
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: P2P

by texmex » Tue Sep 03, 2019 10:48

For trees and other decoration, I guess seed based placement needs to replace any random placement algorithm in order to be determinately generated. I'm a bit interested in this too: that the seed dictates everything.
 

User avatar
Yvanhoe
Member
 
Posts: 121
Joined: Fri Jul 05, 2019 03:18
Location: Japan

Re: P2P

by Yvanhoe » Tue Sep 03, 2019 11:09

I thought the map generation was deterministic? That a given seed would only give the same mapchunks at a given place, whatever the order you generate them?

But note that this is the easy part: making mapgen deterministic does appear to sync clients, but it doable without communication. The problems appear when a client digs a hole and you want to transmit that information to the other clients. Or when a client tries to destroy a protected node and you want to prevent that.
 

User avatar
texmex
Member
 
Posts: 1537
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: P2P

by texmex » Tue Sep 03, 2019 12:01

Yvanhoe wrote:I thought the map generation was deterministic? That a given seed would only give the same mapchunks at a given place, whatever the order you generate them?

The basics are, but decorations may be placed at random within chunks depending on how the decorations are coded, but I believe that they can be put to follow a seed instead.
 

dark_s0ul
New member
 
Posts: 5
Joined: Mon Sep 02, 2019 05:54
GitHub: max-pasichnyk

Re: P2P

by dark_s0ul » Tue Sep 03, 2019 12:59

Decorations are depends on seed and blocks that was placed recently
The problem is in order of chunk generation when using p2p.
Red arrow is player moving direction, blue is water and green is trees
71c5114b-13cd-416c-9a4e-92264d8d8249.png
(43.75 KiB) Not downloaded yet


In first case forest is generated firstly, and later water can't be placed becouse of forest.
In second case lake is generated first, later trees can't be placed on top of water
 

dark_s0ul
New member
 
Posts: 5
Joined: Mon Sep 02, 2019 05:54
GitHub: max-pasichnyk

Re: P2P

by dark_s0ul » Tue Sep 03, 2019 13:09

What about sync generated chunks between all players, and how it will affect on the performance?
 


Return to Servers



Who is online

Users browsing this forum: No registered users and 7 guests