How do I perfectly time layer manipulation

0 favourites
  • 5 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Hi everyone.

    I'm doing a cutscene for my game that needs to be perfectly timed with a music track.

    I'm doing layer scrolling, scaling and Z elevation with acceleration (using a custom var for speed).

    Now I noticed that when the fps is low everything moves slower. With DT and even slower without.

    Changing the minimum framerate to 10-20 somewhat helps, but I was wondering if there some other way to get this done.

    I don't have any collision checking and I don't mind if it'll skip frames in lower fps.

    I thought maybe taking the FPS into consideration in my events.

    Do you have any suggestions?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Can you show a screenshot of your events?

    dt should work if your FPS are 30 or more.

    You can also use the official behaviors like Tween - they are framerate-independent.

    Changing the minimum framerate to 10-20 somewhat helps

    How do you do this? If your game runs at less than 30 fps, you need to focus on fixing the performance.

  • I have a few layouts with different events, here's one example:

    https://www.headbangames.com/layerdt.png

    The game itself runs fine, it's just the cut-scene which has some webgl effect that are heavy.

    Also the framerate only drops if I have OBS capturing, otherwise it runs fine.

    It's not a very big drop, but even 11 second instead of 10 for the whole transition wrecks up the syncing to the music.

    I know tween and timelines are good for framerate-independent, but there is no way to apply them to layers, only objects. Unless I'm missing something?

  • On second thought, maybe I can put a reference object with tween then read it's values into the layers. That might work.

  • On second thought, maybe I can put a reference object with tween then read it's values into the layers.

    Exactly, an invisible sprite which runs Tween Value - I do this all the time.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)