Requests with no response (sometimes)!

edited September 2013 in Flash (deprecated)
Hello there!

I've been using Photon on as3 for 6 months now, it's great and very useful but I have an issue which turned to a nightmare to me...

The problem is when a request is sent, no response comes back. For example, when a user exits from a room a "please wait" message appears until the server says Ok now you can exit now, but some times that does not happen and they stuck there forever. Also, when the users connect to the game (home page) Photon server does not respond and they stuck at "main loading page". I have some reports about the issue based on users feedback, and most of them came back with "photon wasn't loaded"!!

HELP

Thank you very much :)

Comments

  • Which version of the client SDK are you using and do you use the Cloud or which server SDK?
  • I use flash SDK, version 3.0.1.0
  • Any answer? please!
  • Can you update to the latest Flash SDK we released? v3.2.0.1 is named beta but actually more feature complete and stable. It potentially fixes your issue, too.
    https://www.exitgames.com/download

    "Photon wasn't loaded" is not the most clear error message. We didn't find it in our source, so it's something from your app? How does it happen?
    Can we test your app somehow?
  • Tobias wrote:
    Can you update to the latest Flash SDK we released? v3.2.0.1 is named beta but actually more feature complete and stable. It potentially fixes your issue, too.
    https://www.exitgames.com/download

    "Photon wasn't loaded" is not the most clear error message. We didn't find it in our source, so it's something from your app? How does it happen?
    Can we test your app somehow?

    I will download it and test it...

    "Photon wasn't loaded" is a message I created, it appears when all the resources of my game are loaded and photon took forever but didn't load, and it's being sent to my email every time it happens..
  • I installed the new version "3.2" but I noticed that it's different, is there a way or an interface to upgrade the current version to the new one without reproducing my code?
  • The API had to change a bit to be more like that on other platforms. I'll ask my colleague if he can give you hints how to make the update with least effort.

    About the "wasn't loaded" message: In which way did Photon take forever and didn't get loaded? Loading Photon (the swf, or any library) is not a problem we can fix with the API. What does "did not load" mean in a technical way?
  • Hi,

    Which part of Photon sdk do you use?
    Core, Lite or LoadBalancing?
  • Hi,

    "wasn't loaded" I meant did not respond to my app that it was connected to server or master (cuz I have them in the same phase).

    I use LoadBalancing (the same as the demo)
  • New sdk mainly differs in the way it handles events.

    Instead of adding listeners to peer you should extend LoadBalancingClient and override some of its methods.
    Most important are:
    onError(errorCode: int, errorMsg: String) // various errors including disconnections - see loadbalancing.constants.ErrorCode
    onEvent(code:int, content:Object, actorNr:int) // custom event
    onStateChange(state: int) // client state changes including disconnected
    onOperationResponse(errorCode: int, errorMsg: String, ... ) // to check operation (join random room for instance) result
    onRoomList(rooms: Vector.<RoomInfo>)
    onRoomListUpdate(rooms: Vector.<RoomInfo>, ... )
    onMyRoomPropertiesChange() // someone changed properties of joined room
    onJoinRoom()
    onActorJoin(actor: Actor)
    onActorLeave(actor: Actor)

    You can find full list in documentation.

    Create your Client instance with parameters "serverAddress:port", "appId", "appVersion" for base class constructor and call connect for this instance.

    Please tell which features more detailed description do you need.
  • Ok what method should I use instead of "opLeaveGame()"?

    thank you very much
  • Currently no leaveRoom method implemented. I'll put it in todo list.
    If you need return to lobby, you should call disconnect() and then call connect() again in onStateChange when state changes to Disconnected.
  • Sorry if I'm bothering, but it seems like that joingame and joinrandomgame do not have custom properties? my whole app is built on it!
  • Please feel free to ask as many questions as you need. We need your feedback to make sure that new sdk works properly.

    You can set room properties calling client.myRoom().setCustomProperty(propName, propValue) before join operations.
    While joined call same method to change room properties and notify about this all other clients.

    After joining any client can get these properties via client.myRoom().getCustomProperty(propName).
    You can listen to properties change while joined in overriden client onMyRoomPropertiesChange method.
  • this is not what I meant. how will I make the user join the room according to it's properties? it used to have an argument as the custom properties as the creation and that was how I could match rooms to the players, but now it's different, how can I match them?
  • Not quite get your point. How exactly did you match rooms to players? Was it photon lib feature or you made it yourself somehow? Please post lines of code with photon lib calls which you used for this.

    You can set/get player properties as well as room properties.
    You can get some of room properties in lobby with rooms list.
    Also you can join random room with matching rule specified in parameters.
  • vadim wrote:
    Not quite get your point. How exactly did you match rooms to players? Was it photon lib feature or you made it yourself somehow? Please post lines of code with photon lib calls which you used for this.

    You can set/get player properties as well as room properties.
    You can get some of room properties in lobby with rooms list.
    Also you can join random room with matching rule specified in parameters.


    here is an example:

    [code2=as3]//creating random room
    var gPro = new Dictionary();
    gPro = "random";
    opCreateGame("some_name", gPro);

    //joining random game
    var gRandom = new Dictionary();
    gRandom = "random";
    opJoinRandomGame(gRandom);

    ///****************///

    //create custom room(could be "playing with friends")
    var gPro = new Dictionary();
    gPro = creator_id;//or something else
    opCreateGame("some_name2", gPro);

    //joining custom room
    var gcustom= new Dictionary();
    gcustom = creator_id;
    opJoinRandomGame(gRandom);[/code2]
  • Yes, we totally missed this feature somehow.
    But will fix it during the day.
  • SDK packages updated in download section.
    Use first joinRandomRoom method parameter to specify expected room properties exactly like you did with opJoinRandomGame
    To specify these properties in new room, use myRoom().setCustomProperty(propName, propValue) before room creation.
  • Let me think.. :D :D. Maybe you can go to my free iOS Gameswebsite to learn more.
Sign In or Register to comment.