GreatBigBore Posted October 22, 2016 Share Posted October 22, 2016 Is it just the computation, or is it mostly the I/O, like talking to the browser and waiting for it to push a bunch of pixel data to the hardware? I ask because I wonder if I could fast-forward my game (for a sort of time-travel effect) just by telling Phaser to stop drawing and keep time going forward, but a zillion times faster than the normal frame rate. But if the slow part is really just computing all the physics and stuff, I guess there's no way to fast-forward. Anyone know anything about the guts of graphics libs? Link to comment Share on other sites More sharing options...
ozdy Posted October 22, 2016 Share Posted October 22, 2016 Just try for yourself, physics performance depends greatly on number of objects ingame. Drawing still seems to be the bottleneck in my games (non web-gl). Link to comment Share on other sites More sharing options...
GreatBigBore Posted October 22, 2016 Author Share Posted October 22, 2016 47 minutes ago, ozdy said: Just try for yourself, physics performance depends greatly on number of objects ingame. Drawing still seems to be the bottleneck in my games (non web-gl). Not sure how to try for myself. Do you mean turning off the drawing to the canvas? That's what I was thinking of, but I don't know how to do it. Is it just an easy switch somewhere? Link to comment Share on other sites More sharing options...
s4m_ur4i Posted October 24, 2016 Share Posted October 24, 2016 So. You could make your game "the fastes forwarding" by normal speed. -> So you need the performance to be capable of. But that's your entrypoint: fastest speed. And to play the game at "average ingame speed" you can set game.time.slowMotion = 0.5;https://phaser.io/examples/v2/time/slow-down-time Not as smart as doing is programmatically but maybe a thought worth it? For slow-motion you could even go slower and stuff - and with desiredFPS you can control your setup. regards Link to comment Share on other sites More sharing options...
ForgeableSum Posted October 26, 2016 Share Posted October 26, 2016 game.time.slowMotion doesn't make things go faster, only slower. If you lower the desiredFPS, you will increase the speed of everything in the game. e.g. game.time.desiredFps = 30 will give you double the speed of 60 (the default). The drawback is that you're now looking at 30 FPS, which isn't as easy on the eyes as 60. Link to comment Share on other sites More sharing options...
drhayes Posted October 26, 2016 Share Posted October 26, 2016 In the Phaser.Game constructor you can tell it to render HEADLESS. AFAIK that'll turn off the graphics render. Link to comment Share on other sites More sharing options...
Recommended Posts