ThePhotons's Forum Posts

  • Is there a list/descriptions for all the actions, expressions, and conditions for this thing floating around somewhere?

    Construct2 provides context dependent list of items when you chose any object, including Photon's. This is most handy list I can imagine for app design.

    You can also look at plugin sources where everything declared in terms of Construct2 plugin api.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ...

    What's up with this 500 Msg/s limit ?

    ...

    Sending 10 regular updates per player per seconds looks quite reasonable. You can send only changed parameters optimizing message size this way.

    And you still have 20 message more which you can use for immediate updates on user input e.g.

    [quote:2s6yh1tn]

    Why can we only send strings ?

    ...

    Photon can use arbitrary javascript object, array or basic type as event's payload. From the other hand, It's impossible (or at least I don't know how) to set javascript objects or array as Construct2 action parameter. String is chosen as most generic type available in C2. Using JSON, you can encode any js data as string.

  • What is the best way to do Turnbased game?

    Please read Photon Turnbased documentation: http://doc.photonengine.com/en-US/realt ... -turnbased

    We do not have Scirra plugin specific tutorials or samples for Turnbased but approach is the same for any Photon SDK.

  • Photon Scirra SDK updated: https://www.photonengine.com/Download/P ... -0-0-5.zip

    Please select region again in regions list or app will fail to connect to Photon server (regions codes are in lowercase since this update)

    FIXED: client did not disconnect from game server after Leave operation (and was disconnected by server after 10 sec. if reconnected within this time)

    FIXED: custom and well-known properties retrieval from properties update event (number instead of bool in IsOpen and IsVisible options issue)

    FIXED: options objects literals keys replaced with strings to avoid replacement during export to HTML5 (e.g. join createIfNotExist option did not work in HTML5 export)

    ADDED: 'MasterActorNr' expression

    ADDED: usw, sa, cae regions to dropdown menu

    CHANGED: (BREAKING) existing regions in dropdown menu lowercased (reset menu selection in ui after update)

  • See

  • ThePhotons

    Im having an issue .. if I join a room , then toggle IsOpen or isVisible , then leave the room and try to create a new room... I get this error and the room creation fails. but if i dont touch IsOpen or isVisible , i can join and leave and create as many rooms as I want

    any ideas?

    I managed to reproduce this with 2 clients. One of them updates property. Other leaves and fails to create room then. Please report detailed reproduction steps next time.

    Workaround switching properties back and forth before room creation should work while the issue is being fixed.

  • You may try to use disconnect -> connect sequence instead of leave until it's fixed.

  • [quote:2ym4y1r5]The fix is still there. It may be another bug. I could not reproduce it by quickly leaving the room and joining back. Can you please send simple app reproducing the issue? What's in your browser console when this happens?

    ThePhotons

    Sure, please put in your own AppID - https://we.tl/PGjJangeCB

    ...

    Thanks for detailed report and repro app.

    This is another known issue. If client reconnects to game server within 10 sec. after leaving a room, game server disconnects client by timeout thinking that this is still old client connected.

    Most likely this is because browser reuses connection when new websocket created. We are working on this.

  • Hi all,

    This is Vadim again.

    ThePhotons

    Im having an issue .. if I join a room , then toggle IsOpen or isVisible , then leave the room and try to create a new room... I get this error and the room creation fails. but if i dont touch IsOpen or isVisible , i can join and leave and create as many rooms as I want

    any ideas?

    I used single client (slightly modified demo-test) and simple action sequence: create room -> set isVisible to false -> leave room -> create room. That worked fine for me. Can you please provide more details on how to reproduced it?

    >

    > > Hi guys i´m trying to use this plugin but having troubles with it. Could you guys help me? I am makina a multiplayer quiz with Photon. When a player logs in he goes to a main room where he could find other spare players in order to invite. When he invites another player and the other accepts, both are taken to a new room, just for them. This works fine in multiplayer plugin, but when trying to make it in photon (I first leave room and then, when i am in lobby again), the room is created but some seconds later i get an error 1003/ Server closed connection.

    > >

    > > Thank you for your help

    > >

    > This is due to a bug in leaving room logic in Photon js SDK. Fixed. Please download updated Scirra SDK version 4.0.0.1.

    > Thanks for report.

    >

    I still seem to be getting the exact same bug with version 4.0.0.4. Did the fix possibly revert in the last patch?

    The fix is still there. It may be another bug. I could not reproduce it by quickly leaving the room and joining back. Can you please send simple app reproducing the issue? What's in your browser console when this happens?

    Hi!

    I've been faced the problem - black screen of death.

    It's all okay when I run app using Construct2, but when I export html5 version and then upload it on google drive, it's impossible to see app because black screen only appears.

    Problem disappears if I delete photon plugin.

    HTML5 version here's:

    https://goo.gl/SFy30x

    CapX file here's:

    https://goo.gl/z5YUt0

    What app should do?

    Just send number to all peers and show received number.

    When I run HTML5 versuin, I get errors in browser console:

    Photon-Javascript_SDK.min.js:3 Mixed Content: The page at 'https://64d21b694948dcf0b8ea14978f9568fb0b1c9f82.googledrive.com/secure/AH5…k-X02ZN_wybPaNvb7ay9kOtN07ZticHA2_QdoM=/host/0B55PnHLHjkIGM2VOQmJoaENJYmM/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://ns.exitgames.com:9093/'. This request has been blocked; this endpoint must be available over WSS.a.connect Photon-Javascript_SDK.min.js:3

    Photon-Javascript_SDK.min.js:3 Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.

    Try to switch Photon client to wss.

    ThePhotons is there a way to check who the master peer is at any time? I noticed the Unity Photon docs have PhotonNetwork.isMasterClient but I don't see an equivalent for C2.

    This is not implemented in Photon javascript client. To be done. For now you can consider the player with lowest actorid as master. This is not very reliable but should work in most cases.

    digitalsoapbox , you can send a message that only goes to the master , I just send a function call that only the master gets and make Host=1; incase the host leaves, OnLeave just send that master call and will transfer host to a different client ~~ Send types ( All , others , masterclient)

    Interesting idea. Should work too.

  • I have no insight what Construct is sending.

    I guess it sends 5..20 updates per second and does some smoothing which fits your case well.

    You can send x,y at least 10 times a second. At least, when the position changes. You can also send a direction/speed vector to allow smoothing should some update get lost or delayed (then the client can calculate where the object is going, based on this info).

    For 50 objects, it might make sense to send just changed values. If the direction and speed does not change, you don't need to send position updates (e.g.), because the object moves in a predictable way.

  • : Cool to read you made it! Tutorials are always very welcome. Let us know if you need more input.

  • Hey Tobias , thanks for the response but Im not sure its something I'm doing seeing as Construct 2 bascially doesnt allow you to "fuckup" writing syntax [...] I,only have yes or no as my choices [...]

    so heres how it goes down : the Host can shut the room. this breaks all the clients in the room except the host . the host is fine. If any client leaves , he can not make a game until he toggles the IsOpen boolen , ( doesnt even matter if hes in a room or not ) and that fixes the error and hes free to create games again .. i think whatever the host sends the clients to tell them to shut the room has a bug in it

    I was not entirely aware that you don't write any code in Construct 2. Good to understand that.

    That means there is a bug in our plugin, because the server does get a wrong kind of value where it should get bool (true/false). That much is clear from the error you posted above.

    Closing a room means that no players can join anymore (once the server got your close command). The server updates the other clients in a room that this room is now closed but that does not mean clients should use this value when creating a new room.

    Thanks to your analysis, I would say: Somehow the clients do use that value and this makes "Create Room" fail.

    I created a task for Vadim to check this out when he's back. Because there's a workaround, I hope the wait-time will be bearable.

    We don't have a "Marco Polo"-alike tutorial for Construct so far, sorry. To get some amount of docs done, we write almost all in C# and hope it's easy enough to read and "port".

    https://doc.photonengine.com/en/realtim ... time-intro

    Maybe someone from the community can do a tutorial? We're happy to post and credit any tutorials the community creates.

  • Hi everyone! Here's Tobias writing. Vadim (who's our Contruct Master) is on vacation for two weeks. I will try to help where I can

    if I join a room , then toggle IsOpen or isVisible , then leave the room and try to create a new room... I get this error and the room creation fails

    The image tells me that the value of IsVisible somehow turns into a "double" instead of the expected "boolean" (being true or false). Can't say what's happening here. Maybe you check which value you assign to IsVisible, when you do?

    andykenobi: The region code is "sa". How do you set the other regions? Maybe we have to edit "sa" into a list of regions (there was no update since we added the region).

    I'll try to figure out. Maybe someone else can help right away?

    Badmiracle: I will take a note and have to ask Vadim when he's back. This requires some knowledge about the versions since 4.0.0.1.

    Can you work with 4.0.0.1 for a while longer?

  • Photon server does not send room list on demand. Only when client connects or list is changed.

    Cache what you receive in "on room list" and use cached value each time you want to manually retrieve room list.

  • I asked for browser log which may have more info than error popup you posted before.

    Most likely you are trying to create a room while joined to a room (error states that client is not connected to master server required for room creation).

    Leave room first.