Parse Webhooks

Options
Hi, I've been working with Photon Turnbased for a few weeks and am midway through a board game.

More recently I've been moving towards a persistent board where players can log out and resume play
but I have been running into a slight snag with webhooks and the memory game example.

The default webhooks work just fine, but I am having some issues with the Parse implementation from the repository
(https://github.com/exitgames/photon.web ... ased.parse).

For the webhook URL I am using https://myappname.parseapp.com/

I can see GetGameList being called and a response being received, however I am getting a KeyNotFoundException
with the AvailableProperties of the SaveGameData, which doesn't happen with the default webhooks.
Is it possible I missed something with my configuration of Parse or could this be an issue with the repo?

Comments

  • egress
    Options
    Just to leave an update -

    I've moved over to AWS and have experienced more success there now that I am able to debug the messages sent by Photon Cloud.

    I think most of the issues I face is really due to a lack of documentation :lol:
  • Tobias
    Options
    I will have to kick my colleagues again to make more docs.
    If you let us know where you're stuck or where your progress wasn't smooth, we can concentrate on those parts.
    Thanks and good you're just figuring out things!
    Sorry for not answering your questions directly. I have almost 0 experience with parse and the webhooks.
  • egress
    Options
    Heh no worries! We just had to do some work to find out the what we were receiving from Photon and what we were supposed to pass back. No issues at the moment for now.

    I do have another unrelated question though, I'm using OpWebRPC but I'm noticing that it is not being sent in certain instances.

    For example, I have a button that sends a call that goes to our server to create an account, which works fine in the editor. However, when running on iOS, this call seems to get stuck (OnOpOperationResponse doesn't get called). If I leave the app and resume and call it again, it works this time.

    Another instance is running a GetGameList on Awake from my main menu in the editor. The first time I run it it works, then I switch over to the game scene, and return back. This time the call is "stuck" as above.

    Any insight into this behavior?
  • Tobias
    Options
    Hm. That's odd.

    Actually, the webRPC should behave like any other operation. It's using the same serialization and communication from client to server. Only there, we do the HTTP call to the webservice you configured.

    Do you know if the webservice does get called at all in that case? Anything in the player log?
    Maybe you can send us a mail with the appId you use and a link to this topic. I can ask a colleague to have a look at the server logs then. Mail to: developer@exitgames.com (don't post the AppId here or anywhere public).
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi, I did not want to open a new thread as what I want to ask is related to this one.

    I'm using Photon Turnbased SDK for Unity (4.0.0.4) with the LoadBalancing API of course. (I did find it confusing that the LoadBalancing API was not included in the DLL ! I had to figure it out by myself that I need to copy it also into "Assets/plugins" and "ditch" the readme/docs and dive into the memory demo source code, then manually add the WebRpcResponse class among other "extra" things, well I guess there's no out-of-box magic solution out there but still Photon is good enough for a beginner indie like me).
    I want to know if I have to purchase a Unity Pro license to be able to target Android and iOS platforms or the PUN+ is enough (it may create plugin/DLL conflicts).
    If I choose Parse as a CaaS along with Photon as BaaS can I use Parse's Unity SDK directly instead of Photon's Custom Authentication, Webhooks and WebRPC ("GetGameList", FindFriends, etc.) ?
  • Tobias
    Options
    Thanks for checking out Photon and sorry for the difficulty spike setting up things. I think we can do better and I will try to improve things in updates. The feedback is noted!

    You can combine Photon with most services, as it's very client driven. If you auth somewhere else, you don't need our custom auth. But you can use it to make sure that no hacked clients skip auth on your servers and happily use Photon.
    We partner with PlayFab, who provide accounts, friends, etc. I don't know enough of Parse atm but heard good things, too.

    You can't easily combine PUN+ with Turnbased at the moment, so buying it won't help you at this point. We need to make the LoadBalancing API compatible with the native lib first. It's a matter of bringing together the right dlls and classes.

    I think there is a package in the Asset Store that might help. Good Old Sockets or so. At the moment, I'd try that.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi Tobias,

    I've purchased "Good ol' sockets" today and I'm successfully testing my game on Android devices. I've decided to work with Parse but its pricing plan may not be suitable in the future.

    The future of Unity + Photon + PlayFab looks promising :
    - PlayFab will support Photon webhooks early in the first quarter of 2015. (PlayFab thread in Unity forum)
    - All Photon products will include native sockets support later in January 2015. (got it from an e-mail from Chris at exitgames)
    - Photon will release separate Unity asset store plugins per product in the future. (read it somewhere in a forum)

    One more thing Tobias, do you recommend SOOMLA for authentication, user profile, XP levels AND In-App Purchases ?
  • Tobias
    Options
    I had to look up SOOMLA first and didn't try it so far. If it's usable with Unity, then it could be interesting.
    When it comes to in-app purchases, I would look out for some solution backed by a company, as payment is really ugly to handle when you want it worldwide, etc.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi again Tobias, I hope I'm not asking too many questions !

    I'm trying to understand how the LoadBalancingAPI works by following some videos from the great SkyArena tutorial by Oliver Eberlei (HammerLabs) although it was not intended for Photon TurnBased but some concepts are there like CustomRoomProperties, CustomPlayerProperties, etc.

    I'm also playing with the demos available with the SDK. I did find it weird that you're giving exactly the same SDK for the Turnbased and the Realtime products with the same demos. I'm mainly looking into "memory" and "sandbox" demos but why too many demo projects (particle, chat, loadbalancing) ? Is there a difference between the LoadBalancingAPI files/classes used in each project ? if so, which version should I use ?

    My questions are the following :
    - If I want to update the UI according to the connection state which callback should use : OnStateChangeAction or OnStatusChanged (StatusCode vs. ClientState) ? DisconnectToReconnect is making things more difficult but I know it is important to switch from different servers (Master, Game, Region).
    - The EventCodes reserved for Photon start from 255 but it is not clear where they should stop (the lowest value is 210, the deprecated "AzureNodeInfo"), I know I won't be using too many custom EventCodes (starting from 0) but it is good to know where to stop.
    - I'm good with the CustomRoomProperties concept, I want to know if the CustomPlayerProperties' lifetime is per room or per lobby or can be extended to be persistent ?
    - In the memory demo, there is a dirty hack that handles the duplicate callbacks : the boolean calledByEvent parameter in LoadBoardProperties method. As when OpSetRoomCustomProperties is called both OnOperationCallback and OnEvent are fired for the same reason ! I guess the PropertiesChanged Event is broadcasted to all Actors in a Room.
    Well, I'm having trouble dealing with all these duplicates and I'm trying to do a trace of all the callbacks fired locally and at remote clients for each operation or event raised. Maybe I'll post them here once I finish.

    And please can you take a look at this post which I addressed to Philip ?

    I hope I'm not taking too much of your time.