Hi guys,
as topic,how to integrate it into my game loop link this:
while(true)
{
input();
updateGameWorlds(delta time);
updatePhysics(delta time);
updateCollisions(delta time);
updateAnimations(delta time);
updateAudios(delta time);
render();
}
Besides,how to avoid the data duplication in game worlds,physics engine,render engine!
Thanks a lot!
how to integrate the BULLET into my GAME engine?
-
- Posts: 1
- Joined: Fri Oct 14, 2011 3:48 am
-
- Posts: 65
- Joined: Fri May 13, 2011 1:11 pm
Re: how to integrate the BULLET into my GAME engine?
Asuming your physics engine is leading, your controls would control a kinematic object, directly driving said object in the physics engine.
You then step the physics engine each "tick".
You slap on an update callback to each object and have this callback update the visual world.
There is no way to avoid data "duplication" though, as both the physics and the visual world need their own object representation, where they are being kept in sync with the callback.
Update audio just looks weird, tbh, you should first start reading up general game-engine information and how they are put together, and how everything works.
You then step the physics engine each "tick".
You slap on an update callback to each object and have this callback update the visual world.
There is no way to avoid data "duplication" though, as both the physics and the visual world need their own object representation, where they are being kept in sync with the callback.
Update audio just looks weird, tbh, you should first start reading up general game-engine information and how they are put together, and how everything works.