[Plugin] Photon Cloud

  • Photon plugins updated. Both photon and photon chat support C3 runtime. Not every case is tested. So please do not hesitate to report errors. I will fix asap.

    Download from photonengine.com/sdks

  • Photon plugins updated. Both photon and photon chat support C3 runtime. Not every case is tested. So please do not hesitate to report errors. I will fix asap.

    Download from photonengine.com/sdks

    Thanks a lot!

  • chadorireborn

    Can I create an rts game in real time, controlling units, without lag? because with the original plugins of construct I was very bad.

  • Can I create an rts game in real time, controlling units, without lag? because with the original plugins of construct I was very bad.

    Have you read and understood the entirety of the informations in the multiplayer plugin's manual article and the accompanying tutorials ?

    Lag will always be present because you are dealing with networking and distant servers.

    The solution you are asking for does not exists, there is lag/latency even in big AAA productions nowadays.

    Using the tools provided correctly and understanding how to design around the limitations is the best way to go.

  • > chadorireborn

    Can I create an rts game in real time, controlling units, without lag? because with the original plugins of construct I was very bad.

    There is significantly less lag with Photon than using Construct's native multiplayer support. If memory serves, under high quality networking conditions Exit Games' says average lag is 6ms - which is less than a single frame. Based on experience, this is more or less accurate, and if it worked for me with a fast-paced multiplayer action game, it'll work just fine for an RTS.

    This reason Photon performs so much better is likely partially due to it supporting regional servers right out of the box so players, by default, only connect with those in their region, partially due to not being dependent on Scirra's multiplayer server (unless you set up your own), which requires some server-side knowledge and doesn't avoid the issue of distance unless you set up your own multiple regional servers, and just more optimized networking code in Photon. Photon also uses Websockets, which do not have the same platform limitations as Scirra's multiplayer solution using WebRTC (for example, Photon will work on XB1, while the built-in solution will not... though Construct performance is so bad you'd probably want to go with a 3rd-party native runtime like Chowdren anyway, or develop your game in Unity).

    Photon's actions and events are also easier to understand - and I'd argue far more useful for game developers overall, as their implementation is game-specific and not quite so bare bones as Scirra's - especially if you've never done any online multiplayer work in the past. The cost is also fairly minimal compared to using Scirra's solution with your own servers, which would really be the only way to get even close to the performance Photon can provide.

    Hope that helps!

  • Try Construct 3

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

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

    I'm wondering how the "set properties listed in lobby" can be used to retrieve custom room properties from the lobby?

    As far as I understand, you have to set it to be accessible in the lobby in order to retrieve it from there.

    I tried doing it like this without it working:

    -Photon: is connected to a lobby

    Photon -> set name of local actor to "name"

    Photon -> join room "Room" in lobby (create if not existing)

    Photon -> Set custom property "theProperty" of my room to "testing"

    Photon -> Set properties listed in lobby to "theProperty"

    Text -> set text to photon.RoomProperty(photon.MyRoomName, "theProperty")

    The text as a result then says 0.

    ****EDIT*****

    I saw in this forum post: forum.photonengine.com/discussion/10574/set-via-room-setcustomproperties-not-available-for-roominfo-class

    that you have to set the properties before creating the room. But how is that possible in construct 2? The plugin doesn't have a field to pass room properties when creating a room.

    If I do this:

    -Photon: is connected to a lobby

    Photon -> set name of local actor to "name"

    Photon -> Set properties listed in lobby to "theProperty"

    Photon -> join room "Room" in lobby (create if not existing)

    (also tried create room action)

    Photon -> Set custom property "theProperty" of my room to "testing"

    Text -> set text to photon.RoomProperty(photon.MyRoomName, "theProperty")

    It returns 0 still.

  • Seems like the last bit I tried in the previous post does work, but only if you retrieve it with PropertyOfMyRoom, and not with RoomProperty.

    I can only retrieve the room property after one has joined the room, but not before, even with the "set properties listed in the lobby" before creating the room. Why's that?

  • Seems like the last bit I tried in the previous post does work, but only if you retrieve it with PropertyOfMyRoom, and not with RoomProperty.

    I can only retrieve the room property after one has joined the room, but not before, even with the "set properties listed in the lobby" before creating the room. Why's that?

    Properties listed in lobby is a parameter of room creation. So they should be set before room creation.

    Lobby provides the list of currently existing rooms for players joined to the lobby (not to a room). It also exposes room properties which were marked as "listed in lobby" during room creation. To get property value, you need to pass room name and property name to RoomProperty.

    Normally, client in a lobby should handle "On room list update" event which triggered by any room creation, closing and and "listed in lobby" properties values change.

    Currently plugin does not provide info on which exact rooms have changed (though Photon js api does). So you most likely need to rescan entire room list in lobby and read properties. Like demo-test does in addRoomToList function:

    - iterate from 0 to Photon.RoomCount - 1

    - get Photon.RoomProperty(Photon.RoomNameAt(loopindex), "level")

    If you call these methods while joined to a room, most likely you will get rooms state at the moment of joining to a room which does not make sense.

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