I create simple 2d game where 2 airplanes shot each other. Now it's look like this
So in my computer I have FPS=58-61, but in computer of my friend FPS=250 and game is very fast
How I can correct this?
I tried do device->sleep:
Code: Select all
while(device->run())
{
if (device->isWindowActive())
{
world.time = device->getTimer()->getTime();
world.ProcessKeyboardEvents(&receiver);
//Airplanes moved, bullet also moved, fires animate here
world.RestructSplines();
driver->beginScene(true, true, video::SColor(255, 153, 255, 255));
smgr->drawAll();
world.DrawWorld();
device->getGUIEnvironment()->drawAll();
driver->endScene();
device->sleep(20-(device->getTimer()->getTime()-world.time));
}
else device->yield();
}
My game in SVN
https://code.google.com/p/irrlicht-2d-a ... aneConcept
My game by arhive
http://irrlicht-2d-airplanes.googlecode ... oncept.rar
Please explain what I can Do???