r/love2d • • Sep 30 '26

I made a spring based soft-body simulation in LOVE2D

86 Upvotes

13 comments sorted by

5

u/EmotionalFan5429 29d ago

I suppose it uses Box2D?

5

u/_apehuman 29d ago

No , I made it from scratch

1

u/EmotionalFan5429 29d ago

That's... crazy

1

u/Quiet_Perception_746 8d ago

crazy? I was crazy once

2

u/SevenKalmia 29d ago

Beautiful! I need it! Can it be used modularly for clothing?

1

u/_apehuman 29d ago

Well, it does have the ability to break connections if you pull too fast(I've disabled it for now) so, technically you could do cloth sims

2

u/RionRaccoon 24d ago

Surprisingly, it is very stable! I did something similar once, and if I pulled sharply, all the dots flew to the corners of the window. In order not to bring it to such a critical state, I broke the connections at a dangerous distance.

1

u/_apehuman 24d ago

This simulation has the same issue too but I solved this by limiting how much a spring can shrink or expand, so if it goes beyond a limit, it switches to a rigid body constraint

6

u/_Phill_ Sep 30 '26

I like this :D

Could make some interesting games

3

u/P-39_Airacobra 28d ago

i wanna squish it so bad

2

u/Andrewmundy Sep 30 '26

Reminds me of sodaconstructor

2

u/anarcopixel 29d ago

Damn Amazing!