Skip to main content
added 58 characters in body
Source Link
RandyGaul
  • 1.8k
  • 1
  • 10
  • 11

There's no need to shove a pre-made physics engine into a particular model. All good physics engines are going to be using some form of data oriented design; you can't have a fast physics engine without cache optimization. This means that any benefits from attempting an Entity Component System, or any other data oriented approach will be redundant.

What you can do is write small wrappers that are stored as components in your engine. I'm not familiar with exactly how Bullet works, but I do know most engines have colliders and rigid bodies separated. What is usually done is a collider is represented with a component type, and a rigid body is represented with a different component type. This allows the separate wrappers to support dynamic transferring of the colliders to attach or remove themselves from rigid bodies.

You can apply any programming paradigm to your own wrappers. I honestly think that any wrapper will be perfectly fine. If Bullet does not support run-time modification of the physics objects, then you're out of luck.

There's no need to shove a pre-made physics engine into a particular model. All good physics engines are going to be using some form of data oriented design; you can't have a fast physics engine without cache optimization. This means that any benefits from attempting an Entity Component System, or any other data oriented approach will be redundant.

What you can do is write small wrappers that are stored as components in your engine. I'm not familiar with exactly how Bullet works, but I do know most engines have colliders and rigid bodies separated. What is usually done is a collider is represented with a component type, and a rigid body is represented with a different component type. This allows the separate wrappers to support dynamic transferring of the colliders to attach or remove themselves from rigid bodies.

You can apply any programming paradigm to your own wrappers. If Bullet does not support run-time modification of the physics objects, then you're out of luck.

There's no need to shove a pre-made physics engine into a particular model. All good physics engines are going to be using some form of data oriented design; you can't have a fast physics engine without cache optimization. This means that any benefits from attempting an Entity Component System, or any other data oriented approach will be redundant.

What you can do is write small wrappers that are stored as components in your engine. I'm not familiar with exactly how Bullet works, but I do know most engines have colliders and rigid bodies separated. What is usually done is a collider is represented with a component type, and a rigid body is represented with a different component type. This allows the separate wrappers to support dynamic transferring of the colliders to attach or remove themselves from rigid bodies.

You can apply any programming paradigm to your own wrappers. I honestly think that any wrapper will be perfectly fine. If Bullet does not support run-time modification of the physics objects, then you're out of luck.

Source Link
RandyGaul
  • 1.8k
  • 1
  • 10
  • 11

There's no need to shove a pre-made physics engine into a particular model. All good physics engines are going to be using some form of data oriented design; you can't have a fast physics engine without cache optimization. This means that any benefits from attempting an Entity Component System, or any other data oriented approach will be redundant.

What you can do is write small wrappers that are stored as components in your engine. I'm not familiar with exactly how Bullet works, but I do know most engines have colliders and rigid bodies separated. What is usually done is a collider is represented with a component type, and a rigid body is represented with a different component type. This allows the separate wrappers to support dynamic transferring of the colliders to attach or remove themselves from rigid bodies.

You can apply any programming paradigm to your own wrappers. If Bullet does not support run-time modification of the physics objects, then you're out of luck.