aminhanifm's Forum Posts

  • aminhanifm

    You need to get the current time t0 (not sure what is the best way to do so in ConstructX), send an event, receive it, get the current time again and subtract t0 from it. The result will be round trip time, that is the time required to transmit the signal to the server and back.

    So i need to make variable "t0" then set this variable to my current time every tick, then send an event with t0 data to my own actor for every second, after getting it i need to substract t0 to photon.eventdata ?

  • aminhanifm

    Layout loading:

    If you join a room after layout has been loaded, the "finish" signal would be "on actor join" event. You can simply check the current number of players in the room in this handler.

    Latency:

    To measure round trip time to the server, send an event to yourself (specify client actor id in TargetActors).

    The same works for rtt to players. Send and event and reply to it back to sender.

    I got it work for waiting for other players, thanks !

    But i have another question for this rtt, should i use construct 3 built-in addons like platforminfo plugin to measure rtt of my latency ? then send this latency to myself ? or photon plugin itself has an ability for this ? sorry it's hard to understand for me to measure this rtt..

  • ThePhotons

    I wonder how to measures my latency / ping ? and is it even possible ?

    If yes, can i show latency / ping to other players ?

  • Anyway, is it possible to create waiting for other players to finish loading layout and after finished they send finish signal to the players that already finished loading at first? so they can play althogether.

    Because im having trouble with some potatoes device, the first actor that has faster loading and send to nobody because he finished the loader than this potatoes device which still loading to gameplay layout.

  • Your action may be crash with matchdone = 1, make sure when you are touching / tap it, you already having matchdone variables not equal to 1, because it will get enabled again somehow.

  • Just a little correction - you can't use dots in variable names. So your instance variable can be start_x or startX, but not start.x

    Yes that ! my mistake.

  • start.x is an instance variable of the sprite, you can add instance variable called start.x on your sprite, then set variable of start.x to self.x on start of the layout or from sprite properties. So you can call the start.x function as well. Hope this answer your question !

    He also puts instance variables on his video. check at 1:11 to see how to add instance variables.

  • Try to check admob > policy center. there should be a reason why your app's ads got limited, you can also try to request a review if there's no specific limitation problem or fixed the problem already.

  • aminhanifm

    Actor name is not updated on rejoin with the same actor number. Only new join updates the name. I meant new join when wrote "rejoin".

    We will hopefully fix this in the next release.

    Ahh that's why it doesn't working even i tried to change actor name many times after once joining.

    We will be waiting for the next release, Thanks !

  • aminhanifm

    I guess you try to change actor name while client is joined to a room.

    This is not possible currently. Actor name is changed locally but not updated on other clients. Actor name is used only during room creation and room join. So you need to rejoin to force actor name update on other clients.

    So i have main menu that containing setting to my actor name, then after pressing join random room, it brings my actor name to the random room. for the first time, it's working fine for other actor to see my actor name, then after i leave the room to change my actor name then rejoin the room, my name appears to same like the old one.

    If i need to update on other clients, how to do that exactly ? because i followed photon-test.capx to use this naming actor event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess i found a bug here, when i set my actor name to username variable for the first time, its working fine. After second time i change my username variable, my actor name won't be set to newer one. Anyone facing this problem ?

  • Ah it happens when "Using worker" is enabled on properties, but when i unchecked it, the problem disappeared.. Thats weird :/

  • Hello, why am i getting black screen when adding photon plugin on Construct 3 ? even though i already set the protocol to wss.

    But i able to open Capx example files of photon and c3p but using C2 runtime on Construct 3 and its working fine, only when using Construct 3 runtime that appear to be problem.

    Note : Im currently using photon plugin v 4.1.0.2

  • Yes it is, just open your construct 3 then open the capx file just make sure all plugins that on capx are installed on your C3.

  • And, aminhanifm, is that link only for construct 2?

    Yes but isn't construct 3 able to open capx ?