Hi, Ok... i have problems when i try sync box2D World with the "Game Loop"... SFML works fine... but box2D update positions & forces slowly..
I have this:
LIMIT FRAME RATE:
RATIO PIXELS:
GAMELOOP:
And works slow (Similar to play in the Moon).... ¿How Sync box2D???? :S
Download Demo Game Win x86: Triog v0.1.1.2a
Move with Keys: A-D-SPACE-MOUSE1
Sry for my bad english :\
I have this:
LIMIT FRAME RATE:
Code: Select all
screen.SetFramerateLimit(60);RATIO PIXELS:
Code: Select all
const float RATIO = 30.0f;GAMELOOP:
Code: Select all
if (!world.paused)
{
world.world->Step(screen.GetFrameTime(), 10);
camera.move();
draw_game();
screen.Display();
}
sf::Sleep(0.01);
And works slow (Similar to play in the Moon).... ¿How Sync box2D???? :S
Download Demo Game Win x86: Triog v0.1.1.2a
Move with Keys: A-D-SPACE-MOUSE1
Sry for my bad english :\