Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are the "smallest" physics components in your component-based game engine?

Would it make sense to create something like Positionable, Rotatable, Movable, Collidable and combine them the way you want or is it better to use one unified component like PhysicsInteractable?

share|improve this question
up vote 1 down vote accepted

Well, it depends of the overall look of your engine. I have always aimed for static and dynamic objects; the static ones just sit there with their collision data and the dynamic ones get updated and checked against static and other dynamic objects.

share|improve this answer
This makes sense. Would like to hear more opinions though. – Den Oct 28 '10 at 12:42
I agree with this. You should split the objects into two categories, the actually movable ones, and ones invisibly anchored to the environment, so they affect other objects, but don't move. – Tesserex Oct 28 '10 at 13:13
What about (sub)systems? Should there be two separate systems: one for moving and another for collisions? – Den Oct 28 '10 at 13:25
By doing two systems, you would have to iterate through all your objects twice; one for updating the position, velocity... and other for checking if it collided with something. Just do everything in the same loop: update the properties and check if it intersects something, and then apply bounce/deceleration/etc. – r2d2rigo Oct 28 '10 at 13:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.