How to Make a Rhythm Game in Unreal Engine 5

Table of Contents

Works in Unreal Engine 5.7 and 5.8. Updated October 2026.

Quick answer: a rhythm game comes down to three things:

  1. A chart: the time of every note, usually from a MIDI file made in your music software.
  2. Notes that follow the music clock, not the frame rate. Each frame, place every note by how far it is from its hit time.
  3. Hit timing in milliseconds: when the player presses a key, compare the press time with the note’s time. About 45 ms is Perfect, 135 ms is still a hit.

Why notes must follow the music, not the frame rate

If you move notes by adding up frame times, they slowly drift out of sync with the song, especially after a hitch. Instead, read the song’s current time every frame and place each note from that:

				
					// Every frame: distance of the note from the hit line
float DistanceFromLine = (NoteTimeSeconds - SongTimeSeconds) * ScrollSpeed;

// On a key press: how early or late, in milliseconds
float ErrorMs = (PressTimeSeconds - NoteTimeSeconds) * 1000.f;
bool bIsHit = FMath::Abs(ErrorMs) <= GoodWindowMs;
				
			

Start the music a little before the first note reaches the line, so the player sees notes coming.

Fair hit timing

GradeTiming (early or late)
Perfectwithin 45 ms
Greatwithin 90 ms
Goodwithin 135 ms
Missno press before the note is 135 ms late

Timing in milliseconds feels the same at every song speed. Avoid judging hits with collision boxes on the hit line: their timing changes whenever the scroll speed changes.

Calibrate for audio latency

Players hear the music a little later than the game plays it. Without a correction, every hit feels late. Add an offset setting (in milliseconds) that players can adjust, and subtract it from the press time before grading.

This is what we did in our MIDI Engine 4 PRO plugin.

Troubleshooting

ProblemFix
Every hit is lateRaise the latency offset
Every note is a Miss in Play In EditorClick into the game window so it has keyboard focus
Notes don’t appearCheck the chart pitches match the lanes (60, 62, 64, 65, 67)
Held notes always breakDon’t use a Pressed trigger on the input actions

FAQ

Can I make a rhythm game in Unreal without plugins?

Yes. Use the timing approach above with Unreal’s Quartz audio clock and your own chart format. It’s more work, especially the chart import and editing tools.

Is Unreal good for rhythm games?

Yes. Driving the notes from the audio clock gives you accurate timing at any frame rate.

Can I make a mobile rhythm game?

Yes. Use three or four lanes with on-screen touch buttons instead of keys.

Related tutorials