Jump to content
Search Community

gbish

Members
  • Posts

    2
  • Joined

  • Last visited

gbish's Achievements

1

Reputation

  1. Thanks. That's why I thought I'd ask. It's really an edge case for us as this only happens if a user can change/drop the frame rate down. (Happens for me when I move from one monitor to an externally 'usb-c' ran monitor. The game drops it's frames in half.) One of my ideas was to try to look for the frame rate change event and then scale the the global timeline in order to compensate the difference. But this could still make it 'out of sync' a little. For anyone looking into this, this was my current solution: setInterval(()=> { TweenMax.globalTimeScale(game.loop.actualFps/60) // 60 is expected, but it may change within Phaser's system. }, 1000) // I call this every 1 second, since the game fps shouldn't change all that often.
  2. I have a game running with Phaser 3 engine. It runs at a consistent 60 fps and I needed to use Gsap for it's superior animations and ease of reverse/replay, etc. The problem I have is that it's too accurate for time loss due to FPS. In other words, when the game engine drops to 30 fps. The TweenLite animation still runs and behaves as it should while the game goes half the speed. Unfortunately, I can't speed up the phaser `update` calls. But I wondered if there was a way to link the next tick of the ticker to the update calls of the engine. So that when the game slows down, the tweens will as well. I noticed there was a tick function in the ticker. But is there a way to manually call this in my game loop to make all the animations follow along nicely? Thanks for any help.
×
×
  • Create New...