P2P
-
- New member
- Posts: 5
- Joined: Mon Sep 02, 2019 05:54
- GitHub: max-pasichnyk
P2P
Does minetest support peer to peer, and if not, how far can it be implemented?
Re: P2P
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.
-
- New member
- Posts: 5
- Joined: Mon Sep 02, 2019 05:54
- GitHub: max-pasichnyk
Re: P2P
I mean use p2p instead of client-server architecture for multiplayer
Re: P2P
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.
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.
Re: P2P
Oh please, not that dead horse again...dark_s0ul wrote:I mean use p2p instead of client-server architecture for multiplayer
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.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: P2P
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? ;)Yvanhoe wrote:I am not aware of any consensus algorithm that can beat the latency of a classic client/server architecture.
-
- New member
- Posts: 5
- Joined: Mon Sep 02, 2019 05:54
- GitHub: max-pasichnyk
Re: P2P
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?
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?
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: P2P
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.
Re: P2P
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.
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.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: P2P
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.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?
-
- New member
- Posts: 5
- Joined: Mon Sep 02, 2019 05:54
- GitHub: max-pasichnyk
Re: P2P
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 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
The problem is in order of chunk generation when using p2p.
Red arrow is player moving direction, blue is water and green is trees 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
-
- New member
- Posts: 5
- Joined: Mon Sep 02, 2019 05:54
- GitHub: max-pasichnyk
Re: P2P
What about sync generated chunks between all players, and how it will affect on the performance?
-
- Member
- Posts: 15
- Joined: Fri Dec 13, 2019 10:11
Re: P2P
1. Peer discovery. Develop a peer discovery mechanism that allows MineTest clients to discover and connect to other peers on the network. This can be achieved using a distributed hash table (DHT) or similar decentralized peer discovery protocol.
2. Block synchronization: implement a mechanism for synchronizing the state of the game world between all connected nodes. Each node will need to maintain a local copy of the game world and share updates with other nodes in a decentralized manner. This can be achieved using a distributed ledger or a blockchain-like data structure.
3. Consensus algorithm. Design and implement a consensus algorithm that ensures agreement on the state of the game world among all connected nodes. This algorithm must handle conflicts, such as when multiple nodes try to change the same block at the same time, and resolve them in a decentralized manner.
4. Verification of transactions. Develop a mechanism to verify and verify player actions and transactions in the game world. This could include implementing a decentralized verification protocol or using cryptographic methods such as digital signatures to ensure the integrity of player actions.
5. Security and anti-fraud measures. Take security measures to prevent fraud and ensure the integrity of the gaming world. This may include methods such as peer reputation systems, cryptographic proofs, and grief avoidance mechanisms.
6. User Interface and Features: Modify the MineTest client to support decentralized architecture and provide a seamless user experience. This may include changes to the user interface, networking code, and game logic to accommodate the decentralized nature of the game.
7. Testing and optimization. Thoroughly test your decentralized MineTest implementation to ensure its stability, performance, and scalability. Identify and resolve any bottlenecks or issues that arise during testing.
Who is online
Users browsing this forum: No registered users and 30 guests