citron2010's Forum Posts

  • First, make sure elasticity is set to zero for both the shape and the ground

    I'm not sure what's causing the shape to move when it touches the ground, but the reason it spins out of control afterwards is likely because there's no angular damping.

    Not sure why you're disabling physics either

  • I've always deliberately ignored anything 3D - not neccessarily because of C3's limited support, but simply because it's whole new paradigm to learn. But with recent developments by Scirra, other third-party plugins and especially this one, I think it might be time for me to delve in. Thank you.

  • Using a client input value to send the flip command from guest to host, then sync’ing the flipper’s position back to the guest unfortunately isn’t cutting it even under optimum conditions of same machine using the LAN bandwidth profile. There’s still too much lag for the precision timing required for the game.

    I still don’t really understand what local input prediction actually does but I tried enabling it whilst also flipping the flippers on the guest but it just causes the flippers to jitter – I suspect it’s because they’re normally moved every tick by applying a physics force, but in my multiplayer test, I _think_ they’re only being moved “on client update” and possibly getting slightly out of sync so they keep being moved back and forth slightly showing the jittering.

    I’ve also tried controlling the flippers using “unreliable” messaging – that reduces the lag but the syn’cing is still messed up.

    And I’ve also tried running the physics on both then sync’ing differences when the ball’s hit – but this just highlights what I think is another fundamental issue – there’s many occasions when the ball hits a flipper then almost immediately hits an opponent’s flipper. Either flipper could be moving, so if they’re out of sync (which they inevitably will be due to physical network/hardware limitations), the positions of the flippers, and particularly the ball, quickly diverge and any subsequent attempts to synchronize them causes noticeable jumps.

    None of this comes as a surprise – I’d concluded several years ago that networking Flippee Ball would unlikely work satisfactorily for the reasons above and that sync'ing physics is notoriously difficult.

    It’s a shame because I’ve had many requests for network play – but unfortunately, it’ll have to stay local only.

    The good news is that I now (mostly – see above!) understand how the plugin works and almost certainly will use it at some point in the future - it seems pretty comprehensive and straighforward to use.

    EDIT - just adding this screenshot so anyone reading this has some idea of what I'm talking about!

  • Do you need to do it every tick?

  • Move that red line down until it hits a sprite:

    https://drive.google.com/file/d/1IEbyRnaqajgZo4lg9UX2GUmIYrSPYGtu/view?usp=sharing

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't think you can save the canvas directly to an array. IIRC, each canvas can only "hold" one image in its URL, so you probably need to save them to local storage then reference them in your array.

    EDIT - or load them straight into sprites - but that could cause memory issues if there’s many

  • In the MULTIPLAYER: REAL-TIME GAME example, I see that local prediction is enabled for the Peer sprite. When I play the game, I see that the sprite moves immediately on the peer and if I disable local prediction, then there’s a noticeable delay.

    So, what’s happening? I see that “on client update”, “inputs” is updated to reflect the peer’s button press states. Then every tick the peer also uses this value to move the sprite locally.

    With prediction disabled, it feels to me that “inputs” is updated once and should be sent to the host and actioned on the peer at the same time – but there’s a delay and I don’t understand why or how it's different to when prediction is enabled.

    I’m also not sure I understand WHEN “on client update” triggers!

    Any guidance would be hugely appreciated.

  • I think you can easily do it without an array. Give your pixel sprites two instance vars: “id” (integer and set it on all sprites from 1 to 64) and “pixel” (string - either “.” or “#”). Then on click pixel sprite, toggle its animation and the value for pixel. In the same on click, clear the text then do a “for each ordered by id” loop on your sprites and append the value of pixel to the text.

    Importantly, also append

    ”””BITMAP “

    before the value for pixel if id mod 7 = 1, and:

    “””” &newline

    afterwards if id mod 7 = 0

    Note the double quotes - to allow you to put quote marks in a string.

    (Edit - fixed the newline being in the wrong place!)

  • Is this on mobile browsers or Cordova exports? iOS and/or Android?

  • github.com/Scirra/Construct-bugs/issues/7684

    Workaround is to reduce the line thickness to 5!

  • I think one way to do it would be to duplicate what you have, remove the simulate action from one and the set animation from the other. Then add the "trigger once while true" condition to the group with the set animation action.

  • I've narrowed it down to a very specific set of circumstances and raised it here:

    github.com/Scirra/Construct-bugs/issues/9125

    I do have a simple workaround so don't mind if it's fixed or not, but I'm certain there's been a change in behaviour that the sample project demonstrates. Maybe there's a more serious bug behind this?

  • First breaking release is r485

  • Could anyone's issue be related to creating objects at run time?

    I have a project that works perfectly in 476.4 but not in 487.

    Essentially, I have a JSON array that lists some images stored in local storage. I loop through the array and create a sprite for each entry and assign an incrementing instance var to the sprite. Once they're all created, I request the first image from local storage and load it into the first sprite, then increment the var and repeat until all are loaded.

    But in 487, the first sprite didn't load on local storage get.

    What I've found I need to do to fix is insert a wait 0 seconds after I've created the sprites otherwise the on local storage get doesn't trigger because it can't find the sprite.

    I can't replicate in a simple minimal project I just created from scratch and I can't upload my project as it is as it uses a private back end so I'd have to deconstruct it which might take a while.

    But the wait 0 workaround works for me, so I'm not too concerned - but just thought my findings might help others.