Page 1 of 1

Particle collisions (with cache)

Posted: Thu Apr 22, 2021 9:17 pm
by darkfrei
Hi all!

I've made some easy simulation about moving particles, it was very interesting to unterstand how to use cache grid to make such simulations faster.

The first version without collisions, but squares show where I need to check this collisions :)
Yellow: no collision, green: two circle bodies in this grid square.

Re: [WIP] Particle collisions (with cache)

Posted: Fri Apr 23, 2021 9:11 pm
by darkfrei
Second version:

Added collision detection (red).

Re: [WIP] Particle collisions (with cache)

Posted: Sun May 02, 2021 5:39 pm
by darkfrei
The last version, all collisions work as expected.

Here can be better static resolution: move circles back to the collision, calculate the rest dt and move particles in the new direction. Same as continuous collision detection.

Re: Particle collisions (with cache)

Posted: Thu Mar 28, 2024 4:54 pm
by 麻猫和黄猫
hi,i am from china , your game its the only one i can understand in this fourm, its very helpul ,i must say thanks to you

Re: Particle collisions (with cache)

Posted: Fri Mar 29, 2024 6:53 pm
by darkfrei
麻猫和黄猫 wrote: Thu Mar 28, 2024 4:54 pm hi,i am from china , your game its the only one i can understand in this fourm, its very helpul ,i must say thanks to you
Thanks! I am learning how to code and I've made alot of small programs: https://github.com/darkfrei/love2d-lua-tests