Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: P2P and Video Games?  (Read 3376 times)

userpay

  • Bay Watcher
    • View Profile
P2P and Video Games?
« on: October 31, 2011, 11:00:50 am »

Now granted this is for a paper I'm doing for one of my classes but I'm having some trouble with research for my topic and I'm personally interested in this topic as well. What I'm researching is how viable would a Peer to Peer connection be for playing a video game. From what I understand using P2P, while potentially faster, would probably have more security issues than a typical client-server connection. Also without the packets being sent through the central server first the server can't adjust for lag which leads to higher ping times.

Mostly what I need help with though is what games do people know that, aside from the client download, use P2P in any part of the connection. I've already managed to find one game by accident while I was researching how P2P affects ping that does this, War Rock, but after that searching for games that use it specifically keeps yielding me results for downloading games rather than being about them. I suppose most handheld gaming devices would qualify as I know a number of them use an ad-hoc network to connect to each other.

Anyway I now open the floor for debate.

edit: Oh also would anyone perhaps know of a good program that can simulate networks so I can run tests?
« Last Edit: October 31, 2011, 11:03:22 am by userpay »
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: P2P and Video Games?
« Reply #1 on: October 31, 2011, 11:30:46 am »

While I have little in the form of games to offer, one has to keep track of what P2P can be used for in the first place. The nature of P2P makes downloading highly asynchronous, which means it is unusable for gameplay-related transmissions, as the packet of t = 3:10 may arrive after the packets related to t = 3:20. That means that the games using P2P will mainly be using it for file transfer (well, duh) of maps, mods et cetera. Maybe that could help you pin down the games you're looking for more easily?
Logged

Atomicdremora

  • Bay Watcher
  • I GM out of love.
    • View Profile
Re: P2P and Video Games?
« Reply #2 on: October 31, 2011, 01:56:06 pm »

I don't think he means distributed torrenting. He means connecting directly to one another I think.
Logged

Gantolandon

  • Bay Watcher
  • He has a fertile imagination.
    • View Profile
Re: P2P and Video Games?
« Reply #3 on: October 31, 2011, 02:15:56 pm »

Specify, please. If you mean connecting game clients directly without using the server, there are good reasons why this is rarely done.

The primary one is synchronization. You want the game having the exact same state in the same time, regardless of the client being used. The most intuitive solution would be to have only one instance (server) to decide what's happening and force the other ones (clients) to conform. Otherwise you would have to find some other ways to decide which version of the events in-game is the correct one. Or perhaps combine them somehow.

And the situation begins to be even more complicated when there are more than two clients. You need to figure out a way how to connect them to avoid sending back and forth redundant data - so connecting everyone with everyone is not a good option. On the other hand, you also probably don't want the situation when one player leaving the game disrupts the entire flow.
Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: P2P and Video Games?
« Reply #4 on: October 31, 2011, 02:43:10 pm »

Specify, please. If you mean connecting game clients directly without using the server, there are good reasons why this is rarely done.

The primary one is synchronization. You want the game having the exact same state in the same time, regardless of the client being used. The most intuitive solution would be to have only one instance (server) to decide what's happening and force the other ones (clients) to conform. Otherwise you would have to find some other ways to decide which version of the events in-game is the correct one. Or perhaps combine them somehow.

And the situation begins to be even more complicated when there are more than two clients. You need to figure out a way how to connect them to avoid sending back and forth redundant data - so connecting everyone with everyone is not a good option. On the other hand, you also probably don't want the situation when one player leaving the game disrupts the entire flow.

No. The reason P2P is rarely used for multiplayer anymore is to:
A: prevent modding, reducing the lifespan of games in order to entice users to buy into the inevitable sequels.
B: to literally shut off multiplayer in order to force players into buying the inevitable sequels.
C: make multiplayer broken for pirated games.
D: and least important: to provide a consistent experience to all players and prevent cheating.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

Gantolandon

  • Bay Watcher
  • He has a fertile imagination.
    • View Profile
Re: P2P and Video Games?
« Reply #5 on: October 31, 2011, 03:10:40 pm »

Quote
No. The reason P2P is rarely used for multiplayer anymore is to:
A: prevent modding, reducing the lifespan of games in order to entice users to buy into the inevitable sequels.
B: to literally shut off multiplayer in order to force players into buying the inevitable sequels.
C: make multiplayer broken for pirated games.
D: and least important: to provide a consistent experience to all players and prevent cheating.

You seem to think that only entities like Battle.Net follow the server-client architecture. This is not true. In most of the games, in order to play the multiplayer mode, one of the players has to host the game and the others merely connect with him. Most of the events in the game are unfolded by the server and only their result is sent back to the clients. Therefore if the hosting player is disconnected, the game can no longer be played.

In peer-to-peer architecture, each user is equally privileged. There is no central server which may be shut down.
Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: P2P and Video Games?
« Reply #6 on: October 31, 2011, 03:17:56 pm »

No... In the context of multiplayer games P2P means one of the players hosts the server.

Without a server, there is no authority that defines the game state and network losses or intentional corruption will eventually lead to desynchronization. There are ways to provide for automated failover to persist a game in the event that a server goes down.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

userpay

  • Bay Watcher
    • View Profile
Re: P2P and Video Games?
« Reply #7 on: November 01, 2011, 12:12:15 am »

Good conversation thus far. Do note however that I didn't say that the game must run purely on a P2P connection (or if I did I didn't intend to), only that if any part of the game uses it. This is the link to where I found that War Rock supposedly runs on a P2P network though I am unsure of the validity of it as I haven't looked up the usernames just yet. Notice that its still using a central network but everything non-scoring related (except for one or two odds and ends) appears to be handled by a P2P connection. I am hoping that my new laptop will come before the deadline for this class so that I can try it out and see if I can compare it to a similar game that is known to be central server based.
Logged

Sir Finkus

  • Bay Watcher
    • View Profile
Re: P2P and Video Games?
« Reply #8 on: November 03, 2011, 01:43:57 am »

Specify, please. If you mean connecting game clients directly without using the server, there are good reasons why this is rarely done.

The primary one is synchronization. You want the game having the exact same state in the same time, regardless of the client being used. The most intuitive solution would be to have only one instance (server) to decide what's happening and force the other ones (clients) to conform. Otherwise you would have to find some other ways to decide which version of the events in-game is the correct one. Or perhaps combine them somehow.

And the situation begins to be even more complicated when there are more than two clients. You need to figure out a way how to connect them to avoid sending back and forth redundant data - so connecting everyone with everyone is not a good option. On the other hand, you also probably don't want the situation when one player leaving the game disrupts the entire flow.

No. The reason P2P is rarely used for multiplayer anymore is to:
A: prevent modding, reducing the lifespan of games in order to entice users to buy into the inevitable sequels.
B: to literally shut off multiplayer in order to force players into buying the inevitable sequels.
C: make multiplayer broken for pirated games.
D: and least important: to provide a consistent experience to all players and prevent cheating.
Few of those have anything to do with why p2p isn't used for multiplayer games, in fact it's usually the opposite. The way "p2p" systems usually work, you join a lobby, then when the game starts it talks to a master server which assigns one player as the host.  To make sure everyone is playing by the same rules, the game is usually pretty locked down.  This prevents (in theory) people from joining what they think is a normal game and ending up in a low-grav instagib because whoever got assigned to host wanted it that way.  In practice, more technically savy users can subvert the system and modify the game anyway.  Other issues include high latency because most people have low upload speeds, NAT issues, and the host having an advantage or disadvantage depending on how the netcode is set up.  Once the developer no longer wants to support the game, they shut down the servers and you are unable to get into a lobby.  The game pretty much dies until someone finds a way to emulate the lobby function or join a server manually.

With server/peer multiplayer games, the developer either provides a dedicated server binary, or hosts their own servers.  Usually the former.  If you want to start a server, you simply download the binary and run it on a dedicated machine.  Usually people rent a server in a datacenter because they have good bandwidth and uptime.  Although it is possible to run a dedicated server on the same machine as the game itself, it is rarely done and isn't considered a good practice.  Games with dedicated servers are usually more moddable because the player has a choice which server to join instead of being forced into one.  They also allow for server administrators to immediately ban or otherwise punish disruptive players.  With something like IWnet, you can't give anyone this power because you don't know who the host will be.

As far as piracy goes, I don't have much experience with that.  It does seem like it would be easier to simply bypass the genuine game check on a dedicated server binary than to write a lobby host and then mod the client to connect to that lobby. It would be rather easy to set up a website with a list of cracked dedicated servers.

The only central point of failure for games with dedicated servers are the servers which provide the list of servers to play on.  As I've said before, it would be trivial to simply set up a website with a list of dedicated servers, and usually games with dedicated servers allow you to directly connect to an ip.

Another point I'd like to make is that while I, and many other people refer to systems like IWnet as "peer to peer", that isn't technically correct.  Almost always one machine acts as a host which determines the game rules.  As an example, if I press the "fire" button on my mouse while my crosshair is over another player, that gets sent off to whoever is hosting (be it a dedicated server or another player) and that machine determines whether or not I hit the other player, and then that machine would sent out the results to myself and the other players.  In a p2p system, my client would be responsible for telling everyone else that I shot someone, and there would be no "referee".  This is extremely bad because it allows me to use a hacked game client to simply spam "I killed you" messages to everyone else.