oosyrag's Forum Posts

  • I'm pretty sure loops run in their entirety, in order, within the tick it is called before the next frame is drawn... unless specifically broken up to run across multiple frames....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For example, if you added another On start of layout event at the top level, it would work. Like so:

    Very common gotcha, not documented in the manual at all, but a pretty well known issue. I wish they would add an explanation somewhere in the manual, maybe in the how events works section.

  • You are using letterbox scale. You'll need to use Scale Inner or Scale Outer and design your views accordingly, as described in the tutorial.

    Also I accidentally posted the second page of the tutorial. Here is the first page, in case you didn't notice it had a first page - https://www.scirra.com/tutorials/73/sup ... zes/page-1

  • Click and drag the tab works for me?

  • I recommend you just roll up your sleeves and do the work of remaking the behaviors you need as events, with the every x seconds condition.

    That said, a workaround is to use an invisible placeholder sprite (seems to apply to a lot of problems). Have this invisible sprite run behaviors as normal, smoothly. Set your visible sprite to the placeholders sprite's position every 0.25 seconds.

  • Try the custom movement behavior - there is a "push out solids" action you can use. You can use this in addition to your physics or 8 direction behaviors, along with the solids behavior.

  • Specifically, are there any techniques/best practices anyone can share for creating/destroying synced objects for multiplayer?

    I understand lag compensation for already created objects - When sending the input to the host, the peer will also move the object instantly, then the game engine will subtly and automatically correct the object's position/angle on the peer based on the authoritative host instance.

    Especially with the 80ms simulated latency built in, projectiles appear in significantly offset locations when the movement of the player is compensated for and the creation of the projectile object is not.

    A related matter is the destruction of objects - it takes a noticeable amount of time for a synced object that should be destroyed to disappear from a peer's viewpoint. I have ideas to fudge this with animations and opacity, but was wondering if there were better ways.

    I thought about creating/destroying the object on the peer side ahead of time, but then the host would create a duplicate due to the syncing. Should I not sync the projectile object at all and create my own system for position compensation (host adjusting peer's objects) via messages? There is also the issue in my specific game where I'm applying a random angle variation on the projectiles for a cone of fire... The host and the peer would not get the same random numbers if they each did their own thing.

  • Here is an example.

    You will use the action Multiplayer: Broadcast Message for the host, and the condition Multiplayer: On Peer Message or On Any Peer Message for the peers.

    Edit: I'm actually not sure myself how changing layouts interact with object syncing, maybe someone else who has experience regarding this can chime in.

    Changing rooms is also an interesting idea, but I think re-associating peerIDs to the correct people could possibly cause a lot of headaches and problems. I assume the peerIDs will change upon entering a new room.

  • Have the host send a message to trigger changing layout on all the peers.

    Then in the new layout, set it up as the tutorial describes where objects are created and assigned to peers.

  • Use Else.

    If A, shoot right

    Else

    if B, shoot left.

    This can get messy if you are doing diagonal shooting.

    Otherwise, I recommend setting an angle for firing direction as a variable, and shoot at that angle. Then you can do 360 degree shooting and not have to worry about shooting multiple directions at the same time.

  • https://www.dropbox.com/s/otqwjdrm4tzvm ... .capx?dl=0

    Waypoints are an ordered set of coordinates. You can save each waypoint in an array in order, then have your sprite move to each waypoint in order based on the coordinates you saved in the array.

  • Waypoints can be stored by pushing them in to an array.

  • I've done something like this for different interfaces when in landscape/mode by comparing to see if height is greater than width, so I'm pretty sure it would work to target different aspect ratios and resolutions. Although it seems like a lot of extra work, when I (and other big budget games I've noticed) can just use scale outer and pin ui elements to viewport edges or center to target all possible aspect ratios at once.

    In case you haven't seen it before, this tutorial covers a lot regarding aspect ratios. https://www.scirra.com/tutorials/73/sup ... zes/page-2

  • Looks a lot better than mine! I actually haven't explored all the effects myself yet either.. It would be nice to have a page documenting all the effects visually.

  • Here's an example. I won't be able to make the exact same effect, It really is up to your own experimentation.

    Or if you are set on having that exact effect, you can PM the creator... I believe he is still active on these forums.

    https://www.dropbox.com/s/e87o7i6u8aqbz ... .capx?dl=0