Search Unity

Can't see players connected using M2H network example

Discussion in 'Multiplayer' started by Dano, Dec 3, 2009.

  1. Dano

    Dano

    Joined:
    Nov 7, 2009
    Posts:
    39
    I used the base example by M2H for networking, you can see it here

    http://www.renderjug.com/?page_id=57

    On my local machine I can connect as a host and multiple players, in the island I can see the other players and chat to them.

    When i ask a friend to join the island from another pc and location I cant see them.

    I'm I missing something straight forward? does everyone not connect to the same island once one has been opened?

    Does this example not work with people in different locations?

    Thanks for any help.
     
  2. Dano

    Dano

    Joined:
    Nov 7, 2009
    Posts:
    39
    Anyone?
     
  3. Haplo

    Haplo

    Joined:
    Dec 2, 2009
    Posts:
    4
    What exactly is occurring? Are you getting any errors? Are you using standalone builds, or are you trying to run the instances from two different Unity editors? Or two different web browsers as in the link? Are the two different locations across a local LAN or across the internet? Any firewalls? If so do you have ports opened up for your app?

    More information would be helpful, and yes you should be able to connect from different locations no problem if it is based on the same networking as the tutorial.

    Take care,
    - Hap
     
  4. Dano

    Dano

    Joined:
    Nov 7, 2009
    Posts:
    39
    Thanks for answering...


    Just before I start, when I refer to 'island' I mean the process of opening or joining the island project shown in my above link.

    There are no issues when I myself test the project on my computer, by test I mean I open a browser and open the island (server user). Then in a seperate browser window I open it again and join as a player.

    This works fine and I see the other player cube and can use the chat to send messages between the server and player.

    Even with 3 browser windows and 2 players and a server user this works.

    The problem is if I open up the island, then msn a friend to go to the island, they are unable to join the island that I have already opened. Everyone seems to be able to open an island, but across different locations and computers not connect to an island already running by someone else.

    I thought that if I opened the island I should be able to invite you to click 'Join open island' and we could see each others players cubes and chat?

    What I'm I missing?

    I'm not getting any errors reported.
     
  5. Haplo

    Haplo

    Joined:
    Dec 2, 2009
    Posts:
    4
    I can't see your code, but it looks like you may be polling the web player for *it's own* localhost IP address... which would not be attached to the internet.

    I tried entering the following information:
    Leaving it as is
    Entering my static IP address and port information.
    Setting up one of our VPS servers as a temp router.
    Varying Port information.
    Disabling Firewalls.

    In all cases, localhosts work between themselves, but incoming connections are unseen as you stated.

    You are not polling for external connections somewhere. How far from the tutorial code have you strayed? That is what I have based my first network testing on, and it has worked rather well for me so far.

    I have been stress testing the network layer using what I assume is the same terrain tutorial you've found with the volcanic island. I stretched it to a 2000 x 2000 map, with a crap load of trees, a few 'water spouts' aside from the volcano, and having around 40 people on at the same time so far using the Lerpz toon and animations as we are still waiting on modeling and artwork.

    Overall I am impressed so far with 40+ players as I can see on the wife's PC right next to me that lag is not an issue for the most part.

    In fact I am almost to the point of deciding to use a 'battlenet' configuration for our game instead of messing around with a whole different structure to achieve MMO status.

    Take a closer look at your code and let us know if you find anything. Sometimes it is something staring you in the IP or annoying as a NAT ;)

    Take care,
    - Hap
     
  6. Dano

    Dano

    Joined:
    Nov 7, 2009
    Posts:
    39
    I wonder if I'm missing something simple?...

    http://www.renderjug.com/?page_id=251

    The above is the std tutorial, testing that across different pc's does not work either?

    Daft question, but do I need to set up anything outside of the tutoral?
     
  7. Dano

    Dano

    Joined:
    Nov 7, 2009
    Posts:
    39
    For example I have not set anything up on SmartFoxerver etc?
     
  8. Dano

    Dano

    Joined:
    Nov 7, 2009
    Posts:
    39
    Anyone got any thoughts?
     
  9. mrdeli

    mrdeli

    Joined:
    Aug 27, 2009
    Posts:
    3
    I've had our IT dept. open ports and I cannot get the M2H samples running on the internal LAN or on the internet. Does anyone have any troubleshooting steps to achieve multiplayer on LAN / Internet so I can do further tests ? Thanks in advnace
     
  10. DutchWarfare12

    DutchWarfare12

    Joined:
    Jan 13, 2012
    Posts:
    64
    me too same problem only im not using mh2 but the connection code and the problem are exacly the same