Delays and Timers not actually frame independent?

I have an animal crossing-esque typewriter dialogue text system in my project. Initially I had it working off of a foreachloop w/delay to set the text print speed. However I’m now getting ready to package and while setting up settings for limiting framerate I found the text and sounds were playing much slower at lower frame rates. It seems delays are 100% influenced by frame rate after all in some way(unless there’s some setting or something I’m missing, entirely possible).

Most things I could find said delays were definitely frame-rate independent but I saw a few others had this issue so decided to rewrite it to use timers which were recommended over delays and supposedly actually frame independent.
Unfortunately after reworking everything I’m still having the same issue. This is the only thing holding my project up at this point.

I’m working on a virtual livestream production setup so having control over framerate is important to be able to control performance with multiple programs/games running at once.

Is my only option really to just lock it to 30 and manually adjust everything back to the right speed lol?

Timers and delays are not tied to frame rate.

Can you show your code?

1 Like

I’m aware they’re not supposed to be, and yet they both slow down when I lower the frame rate.

Not much to show, just basic looping/retriggerable logic working the same with delays and timers.
Timer Version:

Delay Version:

Rest of the code is just checking the array length to see if its finished typing and either ending or calling it again if there’s more dialogue in the hopper.

Sorry if I sound frustrated but this just threw a wrench in the works of me finishing this today xD

Thanks for the reply, any help getting to the bottom of this is much appreciated.

More Info:
I should note everything else works normally regardless of framerate: animations, move to’s, timelines, etc.

The only things in my project being affected by different frame rates are things built with delays and timers.

One is the widget handling the typewriter text, and the others are the blueprint which plays sounds based on the text, and the pawn which changes mouth textures based on the sound being played. All have their play speed set by delays or timers.

Very sorry, your pics are a bit too small.

I think I can see a timer on .05, which is typically faster than in game frame rate.

You can’t set a timer and remain outside the frame system. The timer still has to serviced inside a frame, so setting them very fast ( near frame rates ), will basically end up like a ‘lumpy’ kind of tick.

Surely text appearing on a monitor would be fine at .25, no?

Sorry, I realized 10 seconds after typing it that .25 was a silly idea.

But it certainly is possible to get a framerate independent version of ‘text streaming’.

I’m going to re-read your post…

Yes, I think you need to work with how many characters you want to put on the screen in a certain amount of time. That’s the key to getting it working.

( Are they arrays of words or arrays of characters? )

The reason I tried timers was because it was also happening with delays, even with higher values.

Depends on the version.

In the delay version there’s just the dialogue hopper which stores incoming dialogue statements if one is already typing (Like I said its using voice to text so they’re basically captions.)

In the Timer version I had to add a character array to replace the foreachloop.

I know :slight_smile:

The answer is chars/sec.

I’m not at a machine rn, but can give you an example later.

Each frame, use ‘game time in seconds’ to figure out how long it’s been since the last frame, then you can use you chars/sec amount to know how many to pull from the array.

I was going to try that next.

However since I needed it to pause when it came to certain characters (commas) and I wanted to avoid using a tick, Delays/Timers seemed the way to go.

Plus there’s a ton of unsolved posts going back years with the same problem so I was hopeful a general solution/answer would exist by now.

Thanks.

I assume a total solution would be a dialog plugin.

( You can still pause on commas and full stops. )