Get accurate Input time for rythm game


I’m trying to build a rythm game and would like to have the measured time at wich an input occured or a gamethread/tick independent function with a more stable update time.

I’d try to work with “get accurate real time” function since the partial seconds seem to be very accurate. The full seconds don’t seem to be so on every system WTF Is? Get Accurate Real Time in Unreal Engine 4 ( UE4 ) - YouTube
Best would be a build in timer ofcourse ^^

My problem with the unreals inputsystem is its perfomance orientated solution. It updates with the tick time, wich I’d like to avoid, because I don’t like to force the user to have the best hardware to get compairable results.

By now I’m using Fmod as a sound engine. The “Get Timeline Position” function seems to be accurate down to a millisecond. I can’t tell how accurat that position is to what the user is hearing, but it has an easy interface.

I learned alot in blueprints and now I’m trying to learn c++. Asynchronous functions or multithreading sounded like a good idea, but I’m far from getting that from running. But before I burn my time trying to achiev something that might has an easy solution, it seemed like a good idea to ask here :smiley:

I’d be grateful for any idea.

if you want to make a music-game, my suggestion would be to use the timesynth. You won’t get accurate timing from other solutions that involves tick or timers etc since it fluctuate. If you havn’t check it out, here is a link:

Thx for the suggestion, I was aware of that :wink:

Timesynth only could solve sample accurate stitching of audio clips, wich is cool but not my problem
My problem is the time steps in wich the Input is beging registered./updated, wich is tied to the game thread right now. (30FPS = 0.033s update time, 60FPS = 0.016s … etc.)

My point was that timesynth uses an internal clock, rather then game thread. So when using the playback time variable is based off the synth time clock, not game thread time so time will be accurate relative to the synth (minus thread communication latency).