ThePhotons's Forum Posts

  • 13spongg13

    We do not have any plans on version check.

    What can be easier than single http endpoint returning current version which client can read and check? You do not need webhooks in fact for this simple task.

  • Hi 13spongg13,

    Use AppVersion field in Photon object properties. Only clients with the same AppVersion version can join the same room. Of course this does not prevent older client from joining. They will just play in separate rooms.

    To prevent joining, webhooks may be used (https://doc.photonengine.com/en-us/realtime/current/gameplay/web-extensions/webhooks) but this requires running your own http server implementing versioning logic (basically denying everything that is not of the latest version).

  • fens

    Photon can send arbitrary js data (basic types, objects and arrays) but Construct2 does not support anything aside strings and numbers as far as I know.

    So we could send single number payload w/o conversion to string but this will make api more complicated while benefit is questionable.

  • If CCU max exceeded, server reject join operation and returns operation error code 32757.

    Use Photon.ErrorCode action to get last operation error code.

    Other possible error codes:

    OPERATION_DENIED = -3

    OPERATION_INVALID = -2

    INTERNAL_SERVER_ERROR = -1

    OK = 0

    INVALID_AUTHENTICATION = 32767

    GAME_ID_ALREADY_EXISTS = 32766

    GAME_FULL = 32765

    GAME_CLOSED = 32764

    ALREADY_MATCHED = 32763

    SERVER_FULL = 32762

    USER_BLOCKED = 32761

    NO_MATCH_FOUND = 32760

    GAME_DOES_NOT_EXIST = 32758

    MAX_CCU_REACHED = 32757

    INVALID_REGION = 32756

    CUSTOM_AUTHENTICATION_FAILED = 32755

    AUTHENTICATION_TOKEN_EXPIRED = 32753

    PLUGIN_REPORTED_ERROR = 32752

    PLUGIN_MISMATCH = 32751

    JOIN_FAILED_PEER_ALREADY_JOINED = 32750

    JOIN_FAILED_FOUND_INACTIVE_JOINER = 32749

    JOIN_FAILED_WITH_REJOINER_NOT_FOUND = 32748

    JOIN_FAILED_FOUND_EXCLUDED_USER_ID = 32747

    JOIN_FAILED_FOUND_ACTIVE_JOINER = 32746

    HTTP_LIMIT_REACHED = 32745

    EXTERNAL_HTTP_CALL_FAILED = 32744

    SLOT_ERROR = 32742

    INVALID_ENCRYPTION_PARAMETERS = 32741

  • When a client connects to my game a map appears and the client selects their region, is this a good idea? Or should I look for games in all regions.

    Setting correct region for Photon client leads to better ping. So if ping is important for your game, let player choose region. Otherwise you can use single region letting players from different regions play together.

  • TILK

    1. Multiplayer work on many layout or it's better to do all (the game) on the same layout? My game is like a naval battle game or chess game.

    Layout count does not make any difference. Single Photon object is always available in event sheets.

    2. In Scirra multiplayer plugin, only local variable that I want to share with other player are share with the module "send message". Can I do the same thing with your plugin ? I have no character in my game only a board.

    Photon plugin mostly provides a way to send messages with event number and string event payload to other players joined to the same room. To share local variable, you need to send its value as it changes and update values on other clients from message payload. In some cases you may find 'room properties' or 'actor properties' more convenient to share a value.

    3. In the scirra plugin if the host disconnects the game is over. Here I would like to make sure that if one of the two players disconnects he can continue to play until one decides to leave the game or no longer plays for a while. Is it easy to set up? How can I save local variables from each player and keep safe on both player side all the values?.

    Join action has 'rejoin' parameter which allows to rejoin with the same ActorNr as client had before unintended disconnect or 'Suspend' operation. Call 'Set suspended player live time' before room creation: client will be able to rejoin only during specified time in seconds after disconnection. 'Set empty room live time' action sets the time during which room exists after last player left the room allowing rejoins .

    4. What is the best plan if I have 500 players online and what is the cost ?

    photonengine.com/en/realtime/pricing

    500 ccu for $95/month

    5. ...(I suppose C2 plugin is also compatible with C3?)

    There is C3 version of plugin in SDK package.

    6. Do you have c3 examples or only c2 examples ?

    Provided examples work with c2 and c3.

  • the Mnk

    Hi, I think there is a way to access the actor number from which an event has been received.

    How do I find out the actor who sent an event?

    Hi,

    Photon.ActorNr is the number of actor who sent an event.

  • macube

    Bug: On construct 3 runtime export the project don't work with checked minify script!

    Please download and try updated SDK version.

  • Huyax

    I can't reproduce exact error you reported. In most cases I got "Operation 226 error: Game does not exist (32758)".

    I would suggest you using 'Join Room" action with "Create If Not Exists" options enabled for both creation and joining.

  • Huyax

    Try what? I see 1 text field and 3 buttons when run the app.

  • Hi Huyax

    The error means that client is not connected to the server.

    Can you provide reproduction steps? Which project did you try?

  • the Mink

    Hello, another question, is there any data limit in the free plan?

    I am doing tests and sending some information to each tick it seems that there was some problem, then I thought maybe I was exceeding some limit imposed in the free plan.

    Free plan should work as described.

    What happens exactly? What errors do you have in log? When sending a lot, it may be just exceeding connection bandwidth.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi the Mink

    Hello, is it possible to simulate the reception of an event?

    "Offline" mode is not supported by Photon js sdk and therefore by Photon Scirra plugin.

  • fredriksthlm

    Is it possible to send events to a interest group including yourself?

    Did you try "All" receivers? It should do what you expect.

  • coi

    Chat is resetting everytime I changed layout, I can only be able to get history on first boot. Can I get history with an action? or how can I solve the reset problem?

    Chat history may be loaded only with "Subscribe" action. Client does not store messages. You have to do this yourself and make sure that storage persists when you change layout.