Photon Examples do not work...

atesakaydin
edited July 2010 in DotNet
Hello There,

It has been just two days since I've started Photon. I am trying to connect it with Unity3d for learning purposes for now.

However there are problems with the samples I have downloaded within Photon-Unity_v5-6-1_SDK.zip and Photon-Unity_v5-6-1_SDK.zip. I have also downloaded ExitGames-Photon-Server-SDK_v1-6-2.zip and installed the Photon server. It runs without a problem. The Photon Lite application is indeed listed in the xml file

However when I try to connect to the photon server with any of these samples it fails(Photon server is running as a service in the background).

5.6.1 sample prints a debug message indicating a successful connection on the screen but nothing happens...(keyboard functions do not work and I cant move) and a couple of seconds later it automatically disconnects due to a time out.

For 5.7.0 sample again nothing happens. Nor do I get a debug message or something.

I think these two samples are simpler than the Grid and İsland example of Unity. So it would be great for me if I could execute these samples without a problem.

In addition to this are there any materials you could provide other than these tree(Grid and SDK examples) which would make it easy for me to learn Photon?

Can anyone give some suggestions for it? I mean why is it not working?

Comments

  • By screen I mean Unity Editor.

    On web and standalone builds nothing happens as expected...
  • Don't laugh :D... The sample is set to connect to a server operating at exitgames domain... I've changed it from code to "127.0.0.1:5055" and it works now... Sorry for the above posts you may neglect then :D...

    It may be better if you could attach a readme file to the SDK's though clarifying such small details... Since Photon server operates on localhost I thought the samples do so as well :D.
  • Usually, we configure samples to run on our "demo" server, so you can use them right away, even if you don't run Photon locally.
    If some sample is not configured this way, we will note it in the readme file.

    Good to know it's working.
  • Don't laugh :D... The sample is set to connect to a server operating at exitgames domain... I've changed it from code to "127.0.0.1:5055" and it works now... Sorry for the above posts you may neglect then :D...

    It may be better if you could attach a readme file to the SDK's though clarifying such small details... Since Photon server operates on localhost I thought the samples do so as well :D.

    I am going through the same issue. How do you the server from udp.exitgames.com to localhost?
  • Ok, I thought I had it working but no deal.

    Once again, can someone from Exit Games tell us where to change the server udp.exitgames.com to our own?

    I saw there was an xml file and I also thought that by using NPeer.nNetConnect and defining an ipport would work, but it didn't.

    Thanks!
  • this depends on which stage you are.
    depending on that its in the class where you will find the connect too (thats different for dotnet and the unity one), though its now (for the current client lib versions) called differently: its called LitePeer.PhotonDemoServerUrlPort and for dotnet lite its set in game.cs, assigned to ipPort
  • Thanks dreamora for chiming in.

    I just remembered there are several demos, the one I an inquiring about is the one found in the demo_unity_realtime_cs folder. It's basically a grid floor and from what I understand the client connects as a box object with a name tagged to it.

    Simple enough but I am lost as to where to change the location.
  • dreamora
    dreamora
    edited July 2010
    Such a folder does not exist in the Photon Unity 5.7.4 RC3 Client SDK I fear, which is the current one.

    Within this client its within the game.cs though too (and should be there for all versions aside of the Photon 2.0 RC1 through RC3, where it might be within the actual assembly thats included, the PhotonUnityxxxx library that you need to build yourself through slight modifications from the PhotonDotNet project that comes with the mmo sdk in the server src project (top part of the solution where the two client part projects are)
  • dreamora,

    Thanks for that bit of info. I'll have a look at RC3.
  • Hey Buck,

    Two of the three demos in the DotNet SDK 5.7.3 RC3 use a simple "in-code setup": Open Game.cs and near the top, find "PhotonDemoServerUrlPort". The variable ("ipPort" or "ServerIpPort") is used for peer.Connect(). Set it to: "127.0.0.1:5055" (for UDP)...

    The third "demo-mmo" uses an app config (Visual Studio style). It's next to the compiled exe: Photon.Modules.Mmo.Client.GridDemo.exe.config and the value you are looking for is that of "PhotonServerAddress".

    In the solution it's in Photon.Modules.Mmo.Client.GridDemo (under properties) and as file it's located at "\demo-mmo\demo-client\Photon.Modules.Mmo.Client.GridDemo\Properties".
  • Awesome stuff Tobias. I'll have a go at it again this week.

    Thanks so much!