How do I make top down bouncy objects

0 favourites
  • 14 posts
From the Asset Store
Several elements of the game interface hidden objects
  • Hi there,

    I'm trying to figure out how to make bouncy objects in a top down view.

    Here's an example of what I'm trying to do: https://twitter.com/2xTacker/status/890546334691991554

    Any hints would be much appreciated!

    Cheers!

  • Hi sebrosen ,

    I'm not very familiar to particle objects, but this really looks like a particle object with some properties edited to it to make it bouncy.

    I've tried to make the same, and I was able to recreate everything done in your video, apart from the bounce, only using the particle properties, and 0 events, apart from the event that creates the particle effect on mouse click.

    Maybe the bounce is just an advanced part of it, but this should help you a lot already !

  • Hi sebrosen ,

    I'm not very familiar to particle objects, but this really looks like a particle object with some properties edited to it to make it bouncy.

    I've tried to make the same, and I was able to recreate everything done in your video, apart from the bounce, only using the particle properties, and 0 events, apart from the event that creates the particle effect on mouse click.

    Maybe the bounce is just an advanced part of it, but this should help you a lot already !

    Thank you, do you mind sharing the capx file so I can take a closer look at it?

  • Hi DiabloOvermind,

    No, you can't do this with Particle behavior, so definitely not particles.

    I'm guessing these are sprites, probably Bullet behavior with gravity, plus some programming to make them "bounce" at different angles..

    sebrosen have you tried asking that guy on twitter?

  • My bad then

    Thank you !

  • Hi DiabloOvermind,

    No, you can't do this with Particle behavior, so definitely not particles.

    I'm guessing these are sprites, probably Bullet behavior with gravity, plus some programming to make them "bounce" at different angles..

    sebrosen have you tried asking that guy on twitter?

    Yeah I wasn't trying to do it with particles. I just want to make bouncy sprites/objects on a top down view. I wonder if I need to make an invisible floor that the sprites will bounce on?

  • No, you can't do it, because objects in Construct 2 are 2-dimensional..

  • No, you can't do it, because objects in Construct 2 are 2-dimensional..

    Gotcha. Let me rephrase then: I want to make an illusion of a sprite/object bouncing, just like in the video I linked to above.

  • And I'll ask you again - have you tried contacting that guy from Twitter?

    Because I only have a general idea how to do it and I'm not good with math.

    I tried and it doesn't look very good and my particles are only flying to the left:

    (link removed)

  • Pretty effect.

    Quick theorycraft -

    Have a "base" (invisible) sprite, and the ball sprite in a container. Spawn the base sprite in a random direction in a random speed, bullet movement. The ball will also spawn as part of the container. Pin this to the base sprite's position only so it will move on the "horizontal" plane with the base sprite, and set up its own random vertical bullet behavior for the "height". The sprites vertical bullet velocity will be modified every tick by a set amount downwards (gravity), and when it collides with its own base sprite flip the angle of motion back upwards again while cutting the velocity by a half or third or so. You can round the position or use a distance clamp from the base sprite to trigger a "final bounce", where the bounce action is disabled, and fade can start to kick in.

    I noticed in the example the balls actually collide with the barrels with vertical discrimination too - if you want something like that, you can have a "collide-able" state for the base sprite based on the vertical position or distance from the ball sprite. If the ball is a certain distance (say, the height of the barrel or other obstacle) from the base, you can enable the state. While active, if the base sprite collides with a barrel, it can bounce off or change directions. If it is already overlapping an obstacle when the state is triggered, it can immediately run a bounce action for the ball and continue moving the same direction, representing hitting the top of the object.

    Your base sprite can also be visible as a shadow or glow effect rather than invisible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:7xbijjzs] Pin this to the base sprite's position only so it will move on the "horizontal" plane with the base sprite, and set up its own random vertical bullet behavior for the "height".

    oosyrag, Do you need Pin+ behavior for this?

    It's a nice solution, I tried to make something similar, only without the invisible base sprite.

    That base sprite speed needs to be different depending on its angle of motion. The closer angle is to vertical, the slower it should move.

  • Ok, second attempt.

    http://doptrix.com/C2/BouncingParticles3/

    capx

  • Hey Everyone!

    This looks really good, dop2000!

    I tried it myself and after some bugfixing and fine tuning it works!

    Here is my code for C3:

    1drv.ms/u/s!Asn1IURKZWj8gTWyUBXqilplh8jG

    Have fun

  • Thank you so much guys, really appreciate it!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)