El Constructorr's Recent Forum Activity

  • Since you mentioned any solution is fine, The way I would do is keep an Instance variable (Number) and call it 'steps'. Then:

    [is Player moving] --> Add 0.01 to Player.steps

    (You can change the increment accordingly, trial and error)

    If you don't mind the accuracy of steps, then you can even do:

    [is Key down] [Every 1 second] --> Add 1 to Player.steps

  • the.sand The share link is restricted. You need to choose "Anyone with the link can access" before sharing. Thanks.

    To answer your question about best practices, well yes, there are. Like for your case, since you have multiple animations (and each animation could be different in size) so the best practice would be to select the Origin at (let's say) on the Head of the player and select 'For whole animation', and do that for each Animations.

    Note: For that above, you have to select "For whole animation" and not the same "For all animations". That way, each change in animation would have the player's "Head" aligned (since that's a common/stable part of the character, unless you decide to behead him).

  • Also check the 'Origin' point of your 'Animation' and 'Default' (standing) are exactly the same, or centered. Click on Origin and 'Apply to All Animations'.

  • On desktop if you see this happen, does resizing the browser window bring the dialog back?

    I have had this problem since a very long time on C3 (Desktop, Chrome)... and I have always found that re-sizing a dialog (or re-sizing any left/right panel) somehow brings everything back to normal instantly. (Not re-sizing the chrome window but re-sizing anything inside C3 editor).

    So, for anyone who faces this sudden "hang" or "Grayed out", just re-size an open editor, or side panel.

  • The level is not linear, meaning that it can expand horizontally and vertically. Also, some platform can rotate and move. So my concern of having an array with fixed angle wouldn't allow me to change the angle on dynamic platform. Still, I could do it for the static ones, that are the most used... However, I would still need a system to get the angle for the dynamic platform.

    Yeah, that approach will work for static platforms.

    I may be able to give you more ideas, if you could share how is your terrain going to be 'moving' or rotating? I can't relate, because of the sketch above, I am guessing it is made up of triangles, how are you managing the movement, a screenshot or video might help.

    I do have some ideas in mind, but it all depends on how your terrain is created (if it can be recreated differently maybe?).

  • What I would do is:

    Before game starts, spend around 1 second, to (automatically) survey the terrain and store 'angle' data in an array. That way, all the CPU-consuming tasks (collision-checking for angle detection) will be done beforehand and not in real-time.

    For example: Use the Ray-casting method by (above), and have it run along the terrain rapidly (use object time-scale if possible), and as it moves, every X distance, it checks the angle and stores in an array.

    Then, when the player uses the terrain, based on the X location, it uses the array data to set angle.

    Just a thought. What do you think?

  • I believe the object Sync would only sync what you've asked it to. For example: Position?

    Mirror is different from Position and Angle. You'll have to do it using another event/action.

    [Host]

    [Keyboard] On Space Bar: [Multiplayer] Send message to Multiplayer.PeerID, tag: "m", message: "yes"

    [Peer]

    [Multiplayer] On message "m": if Multiplayer.message = "yes", Sprite: Set Mirror, else: Not Mirror

  • Hi, I recently purchased Sparsha's Firebase plugin, and wanted to do something very similar.

    So I asked him if it is possible, he said, yes but not directly (he didn't share more details).

    I would contact him when I reach that point if I am unable to set up.. But my guess is it would be done using Date/Time plugin (locally) and instead of the regular "Scores" (or Level) database, have new Day1, Day2, .... Day923 databases everyday to store and display that day's score.

    Again, I haven't tried it yet. But yes, I'm sure it is possible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So there are several ways, you simply need to let Construct know how to identify which one you want.

    The perfect way would be through its UID (Unique ID), which is different even for copied texts (or sprites). You can find it on the left bar.

    All you need to do is: Go to the text object's condition -> Pick by UID, and then make a sub-event for its action, e.g.: 'Set Text: Hey I'm so unique!'

    But 'picking' could be done through many ways, e.g:

    1) its opacity

    2) its position (nearest to something?)

    3) its instance variable

    4) its Z level, top/bottom

    5) ..or any expression or evaluation you can think to differentiate them*

    * Go to System: Pick object by: (here you can see many options, most relevant for you is Pick by Comparison).

  • Hi, I used to use Multiplayer plugin for my two-player game, where the ball (Physics) movements were very smooth and accurate on both ends, only slight lag-delay which was also fine and workable.

    Now I use Photon (implemented on the same game mechanics) and since it doesn't Sync an object automatically, getting every tick positions (or even every 0.03, etc) to manually sync the ball, causes a LOT of stop-motion effects.

    I tried 'lerp' but it also doesn't quite make it look smooth.

    I also tried taking velocityX, velocityY with ball.X, ball.Y but for some reason, it doesn't refresh X,Y anymore (or not consistently) when velocities are given?

    I want to know how does Multiplayer Sync work on Physics objects? I want to re-create that mechanics through Photon.

    Assume a Volleyball game where ball has collisions and projectile motions. Thanks

  • So first, you need to decide who has priority if suppose BOTH players try to move the sprite at the same time? Where would it go? Let's assume Host has the priority.

    If Host has synced the object, and Peer can see it.

    Then let Peer send Touch.X, Touch.Y to Host

    Store it in an some global or instance variable, peerX and peerY

    Now: if Host touching object: Sprite set position Touch.X, Touch.Y

    Else: if Peer touching object: Sprite set position peerX, peerY

    How will you know if Peer is touching object? and stop touching? You can send some boolean (or number) from Peer to Host (as Message) to tell Host "isTouching" and "stopTouching".

El Constructorr's avatar

El Constructorr

Member since 3 Aug, 2019

Twitter
El Constructorr has 2 followers

Trophy Case

  • 5-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

8/44
How to earn trophies