2

Prior to LiquidFun, the only way developers could simulate particle-like bodies in vanilla-Box2D was by creating dynamic circular fixtures.

What are the main advantages of using LiquidFun over the old method? Does it look better? Is it computationally more efficient? Or is it just a simplification (to save on time and lines of code).

I'm asking this because I've stumbled upon quite a few limitations in the LiquidFun particles implementation (especially in collision filtering). Unless there's a real solid reason on why to use this extension over the vanilla version of Box2D - I would probably stick to the good old fixtures.

P. Lance
  • 179
  • 2
  • 13
  • You may want to ask this question on [Game Development](https://gamedev.stackexchange.com) instead. Seems StackOverflow is more oriented towards answering specific programming problems. – Louis Langholtz May 26 '18 at 17:15

1 Answers1

1

I agree with you LiquidFun is very limiting in many areas.

But to answer your question, LiquidFun will be faster than using Box2D circular fixtures, the reason being that a particle in LiquidFun is very primitive, there is really just positional, user and color data, collisions are registered quicker as all particles in a system retain the same radius, which simplifies calculations.

Using a fixture adds more complexity which entails more work, like center of mass calculations and the physics solver in rigid body physics takes longer because there are more constraints.

If you don't need that many particles to simulate you can choose Box2D and create your own emitters and what not.

Moshe Rabaev
  • 1,892
  • 16
  • 31