When will Photon Realtime SDK support arm64?

iwahara
iwahara
edited November 2014 in Native
Hi.

iOS apps have to support 64bit by February 2015.
but, Photon Realtime SDK seems not to support.

when do you support it?

thanks.

Comments

  • Hi iwahara.

    Actually the iOS Client SDK for Photon Realtime does support arm64. Please update to the latest version in our download area.
  • Hi Kaiserludi.

    I'm already using the latest version (ver.3.2.5.5).
    but, it is complie error like following.
    Incidentally, before version is 3.2.5.3.
    libs/iOS/photon/Common-cpp/inc/Helpers/ConfirmAllowed.h:27:67: Type 'long' cannot be used prior to '::' because it has no members
    and
    myapps/Photon/RealtimeManager.cpp:103:25: No matching member function for call to 'opRaiseEvent'
    client->opRaiseEvent(false, NULL, ExitGames::LoadBalancing::Internal::EventCode::ROOM_LIST);
    //(client is ExitGames::LoadBalancing::Client instance)
    
  • [code2=cpp]client->opRaiseEvent(false, NULL, ExitGames::LoadBalancing::Internal::EventCode::ROOM_LIST);[/code2]
    That EventCode is inside the Internal namespace. You should consider everything inside that namespace as not accessible to your app, but as a private implementation detail of the library. Abusing it for custom events of the application is undefined behavior. ROOM_LIST is a code reserved for internal usage, because it is used by the server side to send room list updates to clients inside the lobby. If the client library gets an event with that code then it makes certain assumptions about what data it gets and what to do with it. If that data is not there in the exact correct format, then undefined behavior occurs and a simple crash of the app may even be the best result you could hope for. Is there a special reason why your app is pretending to send empty Photon room lists? Maybe there is a better way of achieving what you want to achieve with that code.

    However this is not the cause of your compilation errors. Those are coming from passing NULL as second parameter to opRaiseEvent(). In clang NULL is of type long and long does not belong to the list of datatypes that are supported by Photon (http://doc-api.exitgames.com/en/realtim ... 00018.html).

    The library is purposely triggering compilation errors for such unsupported datatypes, because those are easier to spot then runtime errrors. For reasons of compatibility to C++ 03 we can't use C++ 11 compile asserts for this, but had to roll out our own compile assert template, which can't deliver such nice error messages as the C++ 11 official standard compile asserts, but nonetheless when you get an error message that contains "ERROR_UNSUPPORTED_VALUE_TYPE", you can be sure that you pass in a variable of an unsupported type.

    So what do you actually want to achieve with that call?
    Do you want to send an integer with the value 0? In that case you should just use 0 instead of NULL.
    Or do you actually want to send an empty array?
    In that case you still need to supply the array size of 0 to make it clear that you want to call the opRaiseEvent overload for arrays and you would also shave to explicitly cast NULL to a pointer to the desired type, so if you would like to send an empty int array then you can do that like this:
    [code2=cpp]client->opRaiseEvent(false, static_cast<int*>(NULL), (short)0, 0);[/code2]

    PS:
    Adding the data size as an extra key-value pair is redundant and will only produce unneeded traffic. You can read it out just fine on the receiving side from, the Object that is storing the data itself, by dereferencing the return value of Object::getSizes().
  • Hi Kaiserludi.

    Thanks for your reply.
    For now, this problem will be solved.

    When displaying a list of the room to the user, for display after filtering by the properties of the room,
    Periodically need to obtain a list of the room, you are calling the opRaiseEvent by specifying the ExitGames :: LoadBalancing :: Internal :: EventCode :: ROOM_LIST.

    I want you to tell me if there are other good way.
  • Hi iwahara.

    Have you tested, if this approach to periodically obtain the room list by a call to opRaiseEvent() does actually work? Honestly I am absolutely certain, that that approach can't ever have worked at all. The reason why I am so sure about it, is, that opRaiseEvent() does only work when the client is inside of a game room on a game server, while in contrast room list events only work when it resides inside the lobby on a master server.

    To periodically obtain the room list, just connect to the server and make sure,that your code does not call setAutoJoinLobby(false). On default a client will automatically join the lobby whenever it connects to Photon and whenever it leaves a game room. On joining a game room it will leave the lobby. When a client is inside the lobby, then it will automatically and regularly receive room list updates without the need of having to trigger them. Whenever anything has changed to the list of open rooms in the last 1 second (meaning, when a room has been opened, closed, turned visible or invisible, when a player joined or left it or when it's lobby-visible properties have changed) then the server will send out a room list update to all clients in the lobby and the clients will apply that update to their local room lists.

    Server side filtering of the room list is not supported out of the box. You would have to modify the server code (only possible with self hosted Photon servers). Therefor I would recommend to filter the room list locally on the client.
  • Hi Kaiserludi.

    I verified that current code can get room list.
    but, I felt current code is not good, so I try better way.
    I think write here if i have further problems.

    thanks.