ThePhotons's Forum Posts

  • Would this plugin work with an platform shooter or is this just for turn based and etc?

    If a platform shooter would work could someone give some brief knowledge on how it would work?

    In theory Photon allows to implement any type of game. But consider higher latency for websockets compared to other platform's udp.

    Check Photon showcase for web: https://www.exitgames.com/en/Turnbased/ ... s-allTypes

    Also keep in mind that Photon plugin does not have full Photon features. But basics should be enough for most cases.

    Working with Construct 2 sometimes looks more tricky for me than plain js sdk usage. But if this is tool of your choice than you just need to sync data over network as shown in pool demo.

  • The latest stable r206 works for me. So there is nothing to worry about for the time being.

  • We do not plan any new demos anytime soon. Existing demos roughly cover basic Photon functionality exposed in plugin.

    Chat api included in PUN is not available in current plugin version (but js sdk has it). You can implement chat using event exchange feature.

  • I've got the examples and works perfectly on IE and Firefox but on chrome i've got timeout errors

    Have you tried it again? May be bad luck and server was temporary down?

    It works for me on all browsers. Do other websocket apps work in your chrome?

  • The approach you mentioned. As I understand... If i fire a bullet, It won't actually fire until the server recieved the message and sent it back to me?

    That may work if lags are approx. the same for all clients. I did not mean exactly this approach, but rather way to calculate lag time which can be used for compensation.

    Yes, you should try to send as few as possible position updates and use interpolation. In extreme case like bullets, you need only one message with initial position and velocity which are enough to reproduce same trajectory on all clients.

  • Never mind. I got it working. Works great! Another question though. Is there any good way dealing with lag compensation?

    Neither plugin nor Photon js SDK have special features for lag compensation (but some other Photon SDKs do have built-in ping measurement and server time updates).

    You may try to implement lag measurement by yourself sending event to "All" receivers (such event goes to sender as well) and calculate round trip time in event receive handler. Note that every event goes to the server first and then broadcasted by server to all destinations.

  • matrixreal

    Sorry, we can't help you until you explain what is not working.

    Run project from editor and check browser console for errors and other info.

    The capx file is the same except that actual app id set before export.

    • Not sure what room deletion should do. Room removed from list after last player left the room.
    • Who kicks the player? If other client, then just send message to the player you want to kick. Client should handle it and leave the room itself.
    • Plugin does not has specific JoinRoom error handler currently. Use generic "On Error":

    You need separate appid for every game.

  • Could anyone experienced with this plugin confirm if my questions are doable with this plugin?

    The plugin is Construct 2 interface to Photon js sdk http://doc.exitgames.com/en/onpremise/c ... javascript

    Which in turn is one of sdks available for work with Photon Cloud: http://doc.exitgames.com/en/realtime/cu ... time-intro

    While plugin covers not all js sdk / Photon cloud functionality it may be quite enough for your needs which look like fit good in Photon cloud infrastructure.

    Please check documentation, tutorials and demos on exitgames.com and feel free to ask if something is still not clear.

  • we still wait for the new capx (probably with some fixing bugs)

    because the first one on the main page not working

    thanks

    Can you be more specific, what exactly does not work for you, which errors do you get.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • wich wrapper you use ? cordova ? ejecta ? cocoonjs ?

    and can we have a capx example ?

    It does not use any wrapper. As I wrote we did html5 export from Construct 2 export menu.

    Links to sample projects are in 1st post of this topic.

  • I found if two players start at the same time (common when running two windows in construct), the first will start creating a room, which is recognized by the second player, but its not complete enough for the second to join

    Probably this is one of the reasons why js sdk joinRoom() call has 'createIfNotExists' option in Photon js sdk.

    But it's not exposed in Construct 2 plugin yet, sorry.

  • I tested again, it appears that some network port /or possible firewall is blocking photon on some of the machines ( NameServer peer error 3001 followed by peer timeout 3004).

    Then this is not iOS-specific problem as you described it earlier.

    [quote:9bo5cjt0]What ports does photon need open?

    You found right doc for required ports http://doc.exitgames.com/en/onpremise/c ... rt-numbers

    It states that when connecting to cloud via websockets, ports 9090, 9091, 9093 required.

    If you use secure websockets then 19090, 19091, 19093 should be open.

    EDIT: ports list updated (removed port which required only for self-hosted server)

  • We tested app exported as html5 website on iPad mini 2 with iOS 8.3/Safary. It works w/o problems.

    Exported app: http://demoauthphoton.site44.com/c2-dem ... index.html

    (we may remove the app in several days so link may become broken)

    Maybe there are issues with dns on your device.

    Or temporal Photon websocket server malfunction at times when you were testing.

  • bentwonk,

    Thanks for feedback.

    [quote:7glh8mhz]I note there is a "joinRandomRoom no match found" event, could there also be an event for non random rooms, along the lines off "roomNotFound"

    Errors other than "onJoinRandomRoomNoMatchFound" can be handled via Photon."On Error" event. Log Photon.ErrorCode and Photon.ErrorMessage to get an idea which codes are for which events. 32766 / "A game with the specified id already exist" is for creating room with existing name for instance. OnOperationResponse with operation code (as in js sdk) may be more convenient sometimes. Maybe we will add this handler later.

    We are looking into iOS issue.