[Plugin] Photon Cloud

From the Asset Store
Clouds
$2.99 USD
30 Photoreal clouds from subtle to stormy. Perfect for multiple game genres.
  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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/

  • 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?

    There is always single client in a room which marked as master. This may be useful when you choose running game logic on 1 client only and update other clients with game state from this client. In this case master client acts as a "server" while being regular client. Note that when current master leaves, another client from currently joined assigned as a master.

    Please don't confuse master client with master server which is a part of Photon Cloud infrastructure.

  • >

    > 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?

    >

    There is always single client in a room which marked as master. This may be useful when you choose running game logic on 1 client only and update other clients with game state from this client. In this case master client acts as a "server" while being regular client. Note that when current master leaves, another client from currently joined assigned as a master.

    Please don't confuse master client with master server which is a part of Photon Cloud infrastructure.

    Ok, this is solved, you just have to do it like this:

    I am not sure that the problem has been understood.

    I have two players in the room.

    Only one of them is photon.masterActorNr

    Only photon.masterActorNr will execute the actions of the condition "if (photon.MyActorNr == photon.MasterActorNr)".

    The problem is that the player who is not a teacher / server also performed those actions at the beginning, when he entered the room.

    The second player should never execute those actions because he is the client, this player is not the master. The master is already in the room when the second player entered, however, the second player executed the actions contained in the condition "if (photon.MyActorNr == photon.MasterActorNr)" during some frames

    Then I need to identify which player is the server in the room.

    This is achieved with the condition "if (photon.MyActorNr == photon.MasterActorNr)".

    So why did the non-master player also execute the actions in the condition?

    I need to run the logic of the game on the server only.

    -----------

    Could you try this example with 2 players?, It is the official example of fish.

    https://www.dropbox.com/s/udjs22p38ygo2 ... .capx?dl=0

    Only need the appID.

    I only added this in photon eventSheet:

    You can see that the text is also written to the second player (client).

    But the condition indicates that it should only be written to the master player.

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