playMaker

Author Topic: Networking- Connecting to public IP?  (Read 4168 times)

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 125
    • MABManZ.com
Networking- Connecting to public IP?
« on: August 05, 2013, 03:07:43 PM »
I've been messing w/ networking stuff recently. I tried Photon originally but ran into issues when I realized Photon cannot run an authoritative server and therefor is not good for anything that depends on physics for gameplay. I am also still attempting to avoid needing Unity Pro for mobile for now, or needing to pay for server hosting down the road :) So now I'm attempting a setup using Unity Networking...

I referenced the network sample scenes and am able to connect to a local server without problems, but how would you set up the ability to host a game online and have others connect to your IP? The "connect to server" action only appears to connect to 127.0.0.1 or any other local address you specify.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Networking- Connecting to public IP?
« Reply #1 on: August 06, 2013, 04:17:14 AM »
Hi,

 For this you will need a server running, even with Unity networking.

 Photon has servers, PlayMaker supports Photon Cloud, but you can run Photon with your own server too.

Have you asked on Photon forum how far physics game can be handled when using photon Cloud? maybe it's possible.

bye,

 Jean

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 125
    • MABManZ.com
Re: Networking- Connecting to public IP?
« Reply #2 on: August 06, 2013, 12:37:18 PM »
I was hoping to run one player as the server, is this not possible?

In it's basic form, Photon appears to only relay position updates of objects, but physics are only calculated by the owner of any instantiated object, since Photon cannot act as an authoritative server to do server-side physics to relay to clients. This would be a problem if you have multiple users interacting with one physics object.

I've read Photon can be run from your own server to address some of this, but being a non-coder (my game is 99% Playmaker) it's beyond what I am capable of doing. I'm also a bit concerned with gameplay lag as even basic movement had a noticeable delay using Photon when I was able to get it working. My game is a fighting game and needs precision timing as much as possible.

Photon seems better suited for an MMO or strategy game where timing is not so critical and synced physics are not neccessary. I was hoping a direct P2P connection may offer better results, but it's starting to look bleak for getting functional online multiplayer for me.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Networking- Connecting to public IP?
« Reply #3 on: August 08, 2013, 03:36:32 AM »
Hi,

One player is the master, that's how photon Cloud works. Now for physics, indeed I think it will not really work.

I don't have much experience with physics based multi players unfortunatly, so I can't really give you proper advice on this.


 Jean