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.
Attachments
2021-04-22T23_10_39-Untitled.png (92.48 KiB) Viewed 9209 times
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.
Attachments
2021-05-02T19_36_02-Untitled.png (104.87 KiB) Viewed 8781 times
麻猫和黄猫 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