How Do We Create A Jelly Effect Like "The Floor Is Jelly"

Get help using Construct 2

Post » Tue Dec 20, 2016 4:30 am

http://store.steampowered.com/app/295750/

Im inspired by this game and i would have to say that its the best looking game ive seen in awhile. Would it be intensive to create a jelly effect like the ground has in that game? as soon as i seen it i got an idea for a project and i want to prototype it once i learn how to make this effect.

If anyone knows anything about this please fill me in.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Tue Dec 20, 2016 4:45 am

There's an old example here:
how-do-i-jelly-floor-from-quot-the-floor-is-jelly-quot_p840413?#p840413

It's basically just springs.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Tue Dec 20, 2016 4:50 am

@R0J0hound what!! im going to that thread right now. Thanks for your response.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Tue Dec 20, 2016 4:59 am

@R0J0hound i dont understand how you did that at all but it looks amazing. I tried all 3 examples on that page but only one was suited for platform movement but the player got pulled inside of the floor and was trapped. Is there any tutorials on how to set springs up in construct 2? This effect is so cool and maybe one of my favorites now. I really need to learn how to understand these better.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Tue Dec 20, 2016 5:18 pm

The object getting stuck inside the floor is an unsolved problem currently. The collision response in the capx's was only partially solved.

The springs are not done in a way specific to C2. You should be able to google spring physics tutorials to get the math explained. This may be a good source:
https://www.khanacademy.org/science/phy ... ooke-s-law
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Thu Dec 22, 2016 8:39 pm

Here's another example exploring what can be done:
https://dl.dropboxusercontent.com/u/542 ... pring.capx

I commented it a lot and in many ways it's cleaner than what I've done before. I'm figuring it out as I go and unfortunately it would be too lengthy of a tutorial for me to write. Math used is some simple physics such as:
distance = speed* time
speed = acceleration * time
acceleration = force*mass
spring_force = -spring_constant * displacement
damping_force = -damping_constant * relative_velocity

Also vectors are used. addition, subtraction and dot product.
The dot product is used to get the speed in a certain direction.

Some simple trig is used too.
x = radius*cos(ang)
y = radius*sin(angle)

The collision detection uses the dot product to get the distance from a line. Otherwise everything is a mix of that.

There are two unsolved things in this:
1. The spring mesh can be made to fold in on itself.
2. The balls can teleport through walls if either are going fast enough.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959


Return to How do I....?

Who is online

Users browsing this forum: ultrafop and 12 guests