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

Get help using Construct 2

### » 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.

GMO FOOD = DEATH
B
24
S
10
G
5
Posts: 567
Reputation: 6,493

### » 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
101
S
39
G
134
Posts: 5,591
Reputation: 85,520

### » Tue Dec 20, 2016 4:50 am

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

### » 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
24
S
10
G
5
Posts: 567
Reputation: 6,493

### » 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:
B
101
S
39
G
134
Posts: 5,591
Reputation: 85,520

### » Thu Dec 22, 2016 8:39 pm

Here's another example exploring what can be done:
https://www.dropbox.com/s/4o28kqq4b30pb ... .capx?dl=1
/examples34/spring.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.

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.
Last edited by R0J0hound on Sat Mar 24, 2018 5:58 pm, edited 1 time in total.
B
101
S
39
G
134
Posts: 5,591
Reputation: 85,520

### » Sat Mar 24, 2018 4:02 pm

R0J0hound wrote: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.

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.

Hey, is there a way that you can reupload this .capx file? I want to see what it's like and hope it can help with my project. Thanks.
B
251
S
139
G
15
Posts: 199
Reputation: 27,956

### » Sat Mar 24, 2018 5:58 pm

@YoHoho
B
101
S
39
G
134
Posts: 5,591
Reputation: 85,520

### » Sat Mar 24, 2018 7:25 pm

Wow!

Thanks @R0J0hound. This presets such amazing possibilities.

I am going to make something so perverted with this

R0J0hound wrote: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.

I actually found those two aspects to be the most amusing parts of the demo. Made me laugh, and that is the goal of ... Life really.
B
7
S
2
Posts: 29
Reputation: 583

### » Sat Mar 24, 2018 7:49 pm

I must say, that was inappropriate.
B
101
S
39
G
134
Posts: 5,591
Reputation: 85,520

Next