[Plugin] Photon Cloud

  • Hello

    How to control the loss of packages ?.

    Hi,

    Websocket connection guaranties packets delivery. You can't loose any packet while connected.

    Add logging of sending and receiving of events and key presses. This should help to find the reason of the issue.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm doing tests

    My game is 1vs1.

    Maybe my packet loss error is due to the two players sending data and trigger the same event 2 with their data sent.

    What happens when two players shoot the same event?

    Is the same event executed twice on the same tick? I think that is not possible and the data of a player will be lost.

    Should each player execute a different event?

    Player 1 sends his data and triggers event 2

    Player 2 sends his data and triggers event 3

  • Hi, ThePhotons

    Is there any "Rejoin" and "FindFriend" example in Photon's official showcase?

    https://www.photonengine.com/en-US/PUN/showcase

  • >

    > How can i check an actor's userID that close his/her browser page.

    >

    >

    Hi,

    If "suspended player live time" set (as done in demo-test "onJoinRandomRoom no match found" handler), "On actor leave" called only after specified timeout since client disconnects abruptly. "On actor suspend" called immediately in this case. "Suspend" means that client can reconnect within this timeout.

    Remove this action or set the value to 0 to get "On actor leave" as soon as player disconnects instead.

    thanks for reply

  • What happens when two players shoot the same event?

    Is the same event executed twice on the same tick? I think that is not possible and the data of a player will be lost.

    By default (Recievers=Others), 1st client receives 2nd client's event and vise versa. All other clients receive both events. With Receivers=All, both 1nd and 2nd receive both events. Events are differenciate by player number (Photon.ActorNr). That is why you do not need event codes per players.

  • Hi, ThePhotons

    Is there any "Rejoin" and "FindFriend" example in Photon's official showcase?

    https://www.photonengine.com/en-US/PUN/showcase

    i,

    You can find Rejoin button below Suspend in demo-test app.

    We do not have "find friends" demo. To implement it, you need:

    • call "Set user id" action with user name before join
    • call "Find friends" action with comma-separated list of friend names while connected to a lobby
    • handle "On FindFriends result" event
  • Thank you for all the information.

    My problem was solved, I do not know exactly how but I was investigating for 4 days, doing tests and everything seemed correct although the problem persisted. Yesterday at some point I had to change something and the problem was solved. I can not know exactly what was causing my problem.

    One last question, please.

    If I raise an event with the value 1 in integer.

    The received event will have the value 1 but this will be a literal value, not a integer, am I right? I will have to use int to get the integer value 1.

  • If I raise an event with the value 1 in integer.

    The received event will have the value 1 but this will be a literal value, not a integer, am I right? I will have to use int to get the integer value 1.

    In case you mean event code. There is a bug in Photon plugin. Photon.EventCode should return numeric type instead of string. To be fixed soon.

    Note that usually 'onEvent' condition used which accepts event number, so you do not need Photon.EventCode.

    Thank you for bug report.

  • Oh, I meant this:

    Data is 1 integer, not "1".

    When the event is received with photon.eventData, that value photon.eventData will be literal right ?.

    To get the int value I'll have to do this:

    int (photon.eventData)

  • Plugin event data is always a string value. You can pass a number as well but it will be converted to a string.

    To preserve types and js objects structures, use json encoding and decoding for event data.

  • ThePhotons

    When I export to Android (via Construct 3) and have minify script set to ON - I get black screen when trying to run it on my Android device.

    I noticed earlier in this thread some users were experiencing this issue. Has this not been resolved?

  • Hi ThePhotons . Are you a representative guy from Photon? I was checking photonengine's site for prices and such (and also couple posts on unity's forum) and i would like to ask something specific.

    If you or someone else could anser:

    Can photon help me with a multiplayer game that's not real time? For example, clash of clans. I think that CoC could be programmed pretty much with a state-saving method of informations/eventos, so no room concept nor peer-to-peer. Actually, there wouldn't be even a "CCU" unit, only for the very moment of the information being sent... So basically my question is basically this, if for a game like this i need Photon (or maybe how can it help me).

    TIA,

  • Thanks for your time.

    I keep programming and continue to appear behaviors that I do not understand with the plugin, then new questions.

    I have this condition:

    I believe that the client should never execute this action, only the master / server can execute it but in my program the client also executes it at the beginning (when it connects) during some frames, then it does not execute it anymore.

    Why does this happen?

  • ThePhotons

    When I export to Android (via Construct 3) and have minify script set to ON - I get black screen when trying to run it on my Android device.

    I noticed earlier in this thread some users were experiencing this issue. Has this not been resolved?

    Do you have something useful in logs? I can try to export for Android maybe next week.

    EDIT:

    Minified export in C3 fixed. Please find updated SDK at Photon SDKs download page.

  • Can photon help me with a multiplayer game that's not real time?

    Hi,

    Take a look at Photon Turnbased solution https://doc.photonengine.com/en-us/real ... -turnbased

    It allows to save state between game sessions.

    For not Construct specific requests please contact support email developer(at)photonengine.com

    You may also find Photon forum useful http://forum.photonengine.com/

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)