ThePhotons's Recent Forum Activity

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

  • justifun

    Where are you storing your player list? In a room property?

    It's stated clear in my post above that rooms properties should be used. Is anything unclear in that post or it's just not relevant to your case?

  • fredriksthlm

    1. If you view the AD for a very long time, you will be suspended from the game in background (I guess it will timeout somehow).(I know I can increase the supsended time.)

    What is the best practice here?

    2. When you get back to the game (from the Ad), you will have a LOT of queued raised events waiting for you

    Maybe app still runs but very slow in backround and getting messages but can't handle them.

    If you really suspend the game with "Suspend room" action, client disconnects and does not receive any messages. The point of suspending is later rejoin with the same actor id as was assigned at previous join which may be more appropriate than joining with new actor id.

  • Try Construct 3

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

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

    The task is easy if players never leave the room or always rejoin with old player id. In this case it's enough to assign animation according to index number in players list ordered by id.

    For changeable player list, you can maintain 'animation id' to 'player id' map in room properties. Joined player should scan this map and find 1st empty slot or slot with player id which is not connected (not in player list).

    To avoid concurrency issue when 2 new players trying to occupy the same slot, use expected value check feature (CAS, doc.photonengine.com/en-us/pun/current/gameplay/synchronization-and-state ): property update will fail if you do not provide correct previous value (happens when other player updated it few ms before).

    Don't forget to initialize all slots with 0 during room creation to allow CAS work for first properties updates.

  • Hi fens,

    i think sending positions periodically and interpolating or extrapolating them is the best you can do w/o putting much effort in development.

  • Hi ,

    Photon Voice API is pure C# solution. It can be used w/o Unity but only on C# platforms. We do not have plans for porting it to another platforms including javascript. There is a lot VoIP solutions for web including WebRTC. So I guess JS Photon Voice API would not be very demanded.

  • Hi oOScuByOo

    You need to assign unique identifier to each enemy during creation and send it in position event. When event received, use this id to apply position to correct enemy.

    Also make sure that you run enemy logic on single client only to avoid concurrent updates.

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

  • 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

  • The reason was mixed case in files names. Either C3 runtime AJAX addon or preview host converts url to lowercase automatically. This does not happens in C2 runtime.

ThePhotons's avatar

ThePhotons

Member since 13 Feb, 2015

Twitter
ThePhotons has 7 followers

Connect with ThePhotons