Advertisement

MMO peer to peer gaming

Started by December 08, 2002 10:07 AM
13 comments, last by uncutno 22 years ago
This could be placed in Gamedesign, but im interested in the tecnical part... Would it be posible to create a MMO peer to peer game, whitout any central server?... i have figured out the gamedesign, and i only need peer to peer data transfere... All i need the central server for, is to find the other players... i would save the last 100 who started their game... later, each client would save a list of maybe 1000 other clients, and try to connect them when you start your game... each client would only need to accses maybe 4-5 at the time.. Im realy impressed by Kazaa, and i dont think kazaa have and central server... i want to use this method in a game... Im not talking about a big outdoor landscape, but a different game type... also turnbased, so lag is no problem... My question, what problems do i have to solve, to create a peer to peer flatt network? How do Kazaa solve this? What is the network architecture?
-Anders-Oredsson-Norway-
I have been thinking about this. I came up with using a webserver and a database to keep track of players.

Now I mean by keeping track of them which zone they are in.

the client would query the database using php or asp and return the players in clients current zone.

all these players would then create a p2p system by map.

the players in the p2p ring would just send information on thier location around.

if a player was close to you then the client would connect directly to you and you could pass more complex information.

I am not sure of the max amount of players the p2p could cope with.


Advertisement
Turnbased huh? Won''t that mean a lot of waiting?

Anyway, gameplay itself could certainly use p2p techniques. Any persistence is out of the question though. You''ll need a *lot* of redundance in data storage, too, to avoid people bailing out (as they are wont to do when they loose) and crashing the game for others.

There''s a bunch of problems involved with p2p structures - I don''t know much about kazaa, but there is a free, open source alternative where you can look at the code for yourself: gnutella. They''re just moving to a new better architecture I believe. (gnutella.org?)

Also, I collected a bunch of resource links when working on a similar topic, find it at the bottom of this page. They''re mainly about overcoming NATs and firewalls.


(My projects and ramblings...)
Unfortunatly P2P for any MMOG is flawed in a number of areas including:

1) You need some form of centeral server to keep track of where each client is and tell each client which other clients are close to them (and therefor to establish a P2P with). In theory this could be avioded if you connected to all clients always.. but thats just stupid If you had more than about 5 clients then the redundant bandwidth getting thrown arround would make a lot of lag.

2) More importantly you have to break the golden rule of giving the client power to make game decisions. This enables anyone to edit their version of the game to make them have GODLY SUPER POWERS ! which may be fun for them but very very anoying for anyone else.. This is what makes people Not want to play a game. There is no way arround this problem without a dedicated server

Nice idea but I can never see it working
~ Tim
there are other types of games that could use this system it does not have to be persistent. The main point would be the client security issues. You could use encryption of sort but this ould probably be cracked. How about a massive would full of people that want to fight in hand to hand combat. That would be workable. Just
Reflections,

Let all desicions be made by a set of peers. It''s very hard to subvert a network as a whole, and it will not matter if one client is hacked or cracked, it won''t affect his own game anyway and by making the decision panel peers switch often and not be identifiable from the client (or something), one hacked client cannot affect a friend''s or enemy''s game either (even if they could swing the vote in the decision panel).

Ideally, I think the client must be able to identify the decision panel members (so it cannot be spoofed), but the panel members should not be able to identify the peers they are making decisions for.

(My projects and ramblings...)
Advertisement
An interesting idea Teodric. It sounds like it has potential.. and at least it could possibly be "more" secure. The problem is still that the mechenism could probably be fooled.. The hacked client could possibly just pretend that it had been verified unless it were to pass the IP addresses of the verifiers with the packet and then each client recieving the packet could check with the verifiers (all havign to be on seperate IPs .. say at least 2 or 3) that they had verified the packet (including some CRC check to ensure that they were talking about the same packet.

Problems .. this generate a lot of bandwidth! A P2P game (or otherwise known as star configuration) uses a lot more bandwidth anyway because instead of sending 1 lot of information it has to send to any clients which are close (say about on average 8 times more depending on the game). This will now be multiplied by an additional amount because it needs to also send out the verification packets..

ok a small gain could be achieved by not re sending the packets to the verifiers but instead sending a small verification packet with the other verifiers IPs and the CRC value, but each client recieving the packet (lets stick with 8 clients for now) will then have to connect if not already to the 3 verifier IPs and then check that the packet recieved is valid by sending the packets ID and the CRC and then waiting for a small ack back to confirm. So thats 8 times the message is sent and then 8*3 checks are sent over the P2P network for that one packet (3 times from each client). Apart from the bandwidth there is also the delay of having to verify it all + the time to process other peoples packets and validate them.

Dont get me wrong.. im interested in a solution Im just throwing ideas about and saying where they are flawed. another hack could be that if the hacked client had access to 2 other PCs it could run a spoof version of the game which didnt play as such but instead just acted as a verifier so the hacked client would always pass them as its verifiers and they would always say that the packet was valid

If you can work a way arround this then I would be happy to hear it and help you expand it.. keep it up

Tim
~ Tim
You could make the whole net as a tree! then have a system, that takes care of the infrastructure, that each node was connected the right way... then another system that passed on the information only to the right clients.. (based on world coords or something) and on top of that, the game, showing the player all the nearby people(witch are the only people it would get information about)
If these 3 worked independently, it would be awsom... and i think it would work...

then the server only needed to maybe have a list of the 10 nodes in the top of our tree...

Is it realy totaly imposible to crypt a package?
a all the time changing key... every bit and bit possition changed 10 to 12 times, then cryptated with the key, thats also cryptated... a system where the package values would truly look random... the packages would be made in different places of the code... each package tested by a check sum 2 times before sendt... the first package kontaining a key to the next 15 packages, and then a new package sendt and confirmed containing a new key, and so on...
Is it realy impossible?

I try to think of a hacker, monitoring the port, and each time receave a different first package, and need to confirm with another totaly different package.... maybe 4 or 5 different package cryptation types, changed frequently.... kryptating the first message witch are a key... the client dont know whitch type of cryptation the first pack have, but it tries 10-12 types, and then test a checksum (the last 2-3 bytes in decrypted message) with the rest of the decrypted message...
when it match, it got the right crypt method...
each p2p connection had a different crypt system running each moment... would it be possible?

Is it impossible to hide information in 32 bytes?

[edited by - uncutno on December 11, 2002 8:50:00 PM]
-Anders-Oredsson-Norway-
uncutno I dont really know what your saying.. something about a server managing all the clients (if u mean constantly then its not P2P is it.. but possibly just at connection is ok) And then you go on about crypting the packets. To be honest IMHO there is only limited point cripting packets because A) yes thats right its going to slow your game down even more and usually add more bandwidth lol.. and also there is a fatal flaw! The hacker has the code to do the crypting and decrypting because its stored in your game *G* and although some lame hackers will be stoped here there are a number of them who will just disassemble your code and strip out the encription/decription bit or just call those functions directly so they will just make their edited packet and pass it to your already used function to encrypt and send the packet.

Tim ~off to bed
~ Tim
Well, the main problem would indeed be hacking, probably. But if we put that aside... What if each client was a server for a small area itself?
So, imagine, I come into a new area. My Client connects to the client responsible for it, and everything I do happens over this server. The data for my own character or whatever is only on my client, the server is only needed for interaction with the world.
At the same time, other people are using my Client as a server for a certain area as well.

I guess there are several problems with this system as well. What happens, if a client leaves? Are the clients connected to him just transferred to a different area? That could be quite annoying. Also, it''d be hard to implement anything that needs more room than just one area, and it could get quite bandwidth-heavy if there are a lot of clients in one area.
And it''d be hard to connect all of these areas so that you actually get a world that doesn''t appear to be just a patch of different tiles. Oh well.

On the other hand, it could be very interesting to have such a big world that is always changing. Maybe each client could design his own area of the world, and there could be anything in it from dungeons to towns or whatever.

This topic is closed to new replies.

Advertisement