AngryBots with server instead of Cloud

Options
Created a new Unity project. Imported AngryBots demo from Unity website. It gave me the option of running in the cloud or on my own host. I selected my own host, gave it an IP. Found the only identifiable usable scene in the import - "2_AngryBots_MP" and played it.. not good. 1-2 sec/frame of raindrops is all I see.

Anyone know what's going on?

Comments

  • Tobias
    Options
    Maybe it's still loading? You switched scenes. I think one of those is a pre-loader? Just guessing.
    What does the console output tell you?
  • I wasn't able to revisit this issue till now, so.....

    The downloaded project is AngryBots_MP. The main scene, AngryBots, is empty - which is normally what one would use as the opening scene. It has 4 other scenes in a Scenes folder - Preloader, BeginScene, AngryBots_MP and EndScene. Only the AngryBots_MP appears to have anything of interest. Trying to play it results only in a slow raindrops animation at the starting point (no player appears, no interface appears). The sound "beats" - on and off. That's all it does - no apparent attempts to connect to a server.

    The PhotonServerSettings are:
    Host Type: SelfHosted
    ServerAddress: 127.0.0.1
    ServerPort: 5055 (thought Unity was supposed to use a different port)
    AppID: Master

    I have verified that the Photon Server (v3.0.15) is running in the LoadBalancing configuration.

    Console messages when attempting to run this scene report a NullReferenceException in ReflectionFx.cs at line 44. So -- demo appears to be broken or missing something. I was hoping to be able to download and run it without having to dig into the code and fix anything. Has this demo been tested against the current Unity version? Running 3.4.2f3
  • Hi,
    I'm having also problems to get this demo working propperly, I have the same unity3d versión (3.4.2f3) and I didn't change any parameter from the ServerSettings except the App ID. It's suposed, this should be the only one thing the user has to change, right? Well, I got this message when I run the project:

    Authentication failed. Check AppId.
    OperationResponse 230: ReturnCode: 32767 (Invalid authentication). Parameters: {}
    UnityEngine.Debug:LogError(Object)
    PhotonHandler:DebugReturn(DebugLevel, String) (at Assets/Plugins/PhotonNetwork/PhotonHandler.cs:115)
    NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Plugins/PhotonNetwork/NetworkingPeer.cs:634)
    NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Plugins/PhotonNetwork/NetworkingPeer.cs:674)
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update() (at Assets/Plugins/PhotonNetwork/PhotonHandler.cs:75)

    And you can be very sure that I'm entering an App ID, I don't know if it should be a certain one or just a random one... no idea.
    What's wrong with this asset/project? Is it my fault? Do i miss something? Of course I've read all the documentation the project contains (one pdf and one txt)
  • dreamora
    Options
    The app id has to be Master and ensure to start the loadbalancing instance not the normal one
  • Per my earlier post, AppId is Master and yes, I was running the Loadbalancing configuration... It doesn't work. Still waiting to hear whty the AngryBots main scene is empty (has no components).
  • dreamora, thanks, i was putting a random app id, i got the one from the cloud and now it does not complain because of this, but something else does not work propperly, as i build and run or just play the different scenes and the "loading 0%" stays at mac os environment. at windows scenario i got the 100% loaded but nothing else.
    how can i know what version, balanced or not, i'm running?
    I just post here because my next step shoud be to use my own photon server and not the cloud one, so i'll be dealing, i guess, with the same problems than White Rabit.
  • Hi again,

    I solved the problem I had, I was doing a very big mistake, at the build configuration I didn't put all the scenes. Now I can run AngryBots_MP using the PhotonCloud.
    Now i would like to use my own server, not the cloud one, neither localhost, but my server and I could not get it working yet, my server settings are:
    Host Type: Self Hosted
    Server Address: ip.of.my.server
    Server Port: 5055
    App Id: Master
    But It keeps complaining about the App Id
    Authentication failed. Check AppId.
    OperationResponse 230: ReturnCode: -1 (Unknown operation code 230). Parameters: {}
    :( What I'm missing now?
    I got the PhotonControl working with Instance1 and LoadBalancing and I think this is the configuration dreamora suggested to me, right?
    I have opened the ports for the PhotonSocketServer at the server, so, i guess, this is not a reachability problem... but something else I can't understand.

    Thanks for your advices in advance!
  • Kaiserludi
    Options
    Hi.
    Please stop Instance1 and ONLY run InstanceLoadBalancing, when using PUN or anything, compatible to the cloud. Instance1 (Lite) and LoadBalancing are not compatible with each other and if you run both, then the behavior, which of them is getting you operationRequests, is undefined, and the operationsCodes in use differ between the both.
    Also you should make sure, that you have copied your application id form extigamescloud.com into the according part in your client-code (See exitgamescloud.com for instructions).
  • hi Kaiserludi!

    Thanks a lot for this advice, I think i'm faceing too much "basic" problems with the setup of the server, and the demo configuration, where it's suposed all this is explained? from now i faced several problems such: not knowing what the app-id was and how to get it, not knowing that when using my own server i should put "Master" at this very same field, now i didn't know that there are special ways of being a photon server... thanks that you are here to explain all this stuff, but where could i find more information about what a "Instance1" and "InstanceLoadBalancing" are and which are the different photon configurations?? the basic video tutorial is far simple and does not explain for example what is the difference between start as application or start as service... (just discovered now!).
    And now i'm facing another problem :( now the angrybots_MP connects to the server but complains about the crossdomain file... unity 3d gives back this error just whenever i try to create a game room:
    Connect() failed: System.Security.SecurityException: Unable to connect, as no valid crossdomain policy was found
    How it's suposed i have to create or setup this crossdomain policy???
    I've read that its about the 843 TPC server port, but I've setup the firewall allowing the PhotonSocketServer.exe and having a look to netstat -a i can see this port available.

    And just as a suggestion:
    I think it has to exist a newbies guide... but i couldn't find any. Anybody knows?
    And last but not least, I'm trying this stuff to then, writte my own code, should i expect my code to work if this angrybots code also works? or should i follow this "InstanceLoadBalancing" approach??? (I don't know if this is just a stupid or crazy question, but i was expecting the server to be a much more static and constant thing)

    Thanks again!
  • I still have had no reply as to why the demo simply fails with a null reference exception - We've had a couple of people try the download and all have the same problem. Why is there an empty main scene? Is this demo even supported any more?
  • White Rabbit:
    I've tried to reproduce and experienced some problems as well. I've handed it over to our Unity experts - unfortunately, we are not fully staffed this week, so I hope you have a bit more patience with us. Thanks!

    Juagicre:
    You are right that we currently lack some decent loadbalancing documentation. We are working to catch up, but well.. so much to do, so little time! :( Sorry!

    Regarding the problem with the crossdomain.xml policy files... here is a general explanation how the crossdomain.xml files are delived by Photon: http://doc.exitgames.com/v3/photonserver/policyapp

    The first thing you should check: have you configured the public IPs of the Game Server?

    In Photon's /deploy/Loadbalancing/GameServer[1|2]/bin/ folder, open the PhotonLoadbalancing.dll.config.
    Change this setting and replace 127.0.0.1 with your server's public IP:
    <setting name="PublicIPAddress" serializeAs="String">
    <value>127.0.0.1</value>
    </setting>

    Please restart Photon afterwards.

    If that does not help, please follow these troubleshooting steps:

    1.) Make sure that the Policy app is loaded.
    - Check the PhotonInstanceLoadbalancing-xxx.log file in Photon's "/deploy/bin_XXX/log/" directory
    - There should be an entry like this: " Application: "Policy" started in app domain: X"
    - If that entry is not there, follow the steps from http://doc.exitgames.com/v3/photonserver/policyapp to configure the Policy app.

    2.) Make sure that you can access the Policy app from localhost.
    - Open telnet (on the server), type: "o 127.0.0.1 843"
    - Check /deploy/log/Policy.log
    - You should see the following message with a time stamp that matches the time of the telnet request:
    2011-12-27 12:45:59,097 [13] DEBUG Exitgames.Realtime.Policy.Application.Policy [(null)] - OnDisconnect

    3.) Make sure that you can access the Policy app from your client.
    - Do the same as in step 2), but from your client computer. Use the public server IP for telnet.
    - if you DON'T see anything in the log file this time, you are most likely blocked by your firewall.

    Let me know how it works.