|
Re: P2P & Games
[Re: lostclimate]
#415170
01/14/13 17:21
01/14/13 17:21
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
One big problem would be, that you have to do port forwarding on every client. You can avoid this by using a technique called NAT punsh-through but this requires also a central server. Also you could us UPNP but this isn't supported/enabled on every router. Another big problem would be that P2P games would be "cheater" friendly And that's the main point why P2P isn't used in MP games. You always need a server that monitors the game so that every client has the same chances. It's better and easier to have a central point that manages the whole game and keeps every thing synchron. I can imagine that it would be a nightmare in P2P application to keep everything synchron. The latest ANet version uses P2P for it's voice chat feature. The change to P2P reduces the traffic dramatically. But for a game itself, I would never use P2P because it hasn't really advantages compared to a server-client based architecture! And in multiplayer the only experience I have was at first with built-in gamestudio multiplayer, and then moved on to use Anet a few years ago. The problem with these two is that none of their connection functions return pointers, so they cannot handle multiple simultaneous connections. When you use the ANet socket functions, you can create unlimited connections. These functions return a handle to the connection. With the ENet functions you can only create Server-Client applications. To summerize everything: There are good reason why P2P is not used in MP games! Although I'm sure you will have fun playing around with socket functions and make your own experiences
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: P2P & Games
[Re: Dark_samurai]
#416972
02/06/13 17:37
02/06/13 17:37
|
Joined: Oct 2008
Posts: 513
Carlos3DGS
OP
User
|
OP
User
Joined: Oct 2008
Posts: 513
|
Firstly, thankyou for your thoughts. And it looks like I really needed to update my old ANet ^^
Designing this really is a nightmare but a fun challenge. I have been thinking about cheating problems for this and am designing an idea I would like to hear your thoughts on.
The basic idea is since it is a P2P environment, every client checks the "validity" of the results for incoming data from the other peers as if they were servers. Basic checks like when updating a position checking the distance/time from the previous known position to make sure he didnt travel too far too fast, when recieving "attack" data they check the time since the last "attack" to make sure they are not too frequent, etc... When any client detects "un-authorized" behaviour incoming from another peer in it's "zone" it sends a special message to all other peers in the zone stating an "illegal" action was detected from player X. When any clients recieve "illegal-playerX" messages from more than half of the peer in the zone, they add that player ID to their own internal "ignore list". Kind of like an automated voting system. So if a player is voted "cheater" by the majority all peers in the network "sever" the connection with the cheater, add them to their ignore list, ignore any further data recieved or connection attempts from that player, and no longer send any data to the "cheater" either.
A problem I saw with this system would be new players entering the zone. Creating an ignore list based on another peer's list could be dangerous, as it would leave the system vulnerable to griefers sending malicious "fake" ignore lists that include all players in the zone, leaving the game un-playable because everyone would ignore everyone else except the cheater. But not recieving an ignore list from other peers when connecting would cause problems too. Since they are all "ignoring" the cheater, the other peers are ignoring his incoming data, therefore they do not check his data and dont issue "cheater votes". So the new player would be the only one voting resulting in less than half of the network voting the cheater as "guilty".
So I thought that any player entering the network (zone) initially assumes all peers to be "trustworthy", if they find a peer to be breaking the rules they issue their "vote" as normal, any peer recieving this vote/warning also checks his ignore list and if the cheater is on his list he sends a "cheater vote" automatically.
Since it is a P2P network and there is no centralized server this system does not "enforce" any rules. Instead it is designed to just "isolate" cheaters from the P2P network. Essentially leaving cheaters alone in the dark with nobody to cheat on. You cannot cheat on anybody if there is nobody to cheat on...
What do you guys think about this idea? Do you see any other potencial problems I have not that would need to be taken into consideration?
|
|
|
|