Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualic0de

Posted 02 November 2012 - 01:25 PM

Right now in my game engine I store my objects in an array whose size is defined at load time. This is all well and good but what do I do when an object is added during runtime like using some kind of spawner, the array would have to expand and this is slow. Ideally I would have something similar to Bullet Physics where I can do:

dynamicsWorld->addRigidBody(body);

How would something like that work? I never defined a specific size. Does it use a container class from STL?

#1ic0de

Posted 02 November 2012 - 01:25 PM

Right now in my game engine I store my objects in an array whose size is defined at load time. This is all well and good but what do I do when an object is added during runtime like using some kind of spawner, the array would have to expand and this is slow. Ideally I would have something similar to Bullet Physics where I can do:

dynamicsWorld->addRigidBody(body);

How would something like that work? I never defined a specific size. Does it use a container class from STL?

PARTNERS