This intermediate-level series will teach you how to code a rhythm game that tests the players’ rhythm and timing.
I’m Johnny, aka johnnygossdev, and I’ll be your tutor for this project.
I’ve created multiple written and video tutorials at GDQuest and revamped the official Godot platformer demo.
In this series, we’ll cover:
You could extend this demo to incorporate different gameplay mechanics from different genres, such as those found in Crypt of the Necrodancer or even the first-person shooter BPM: Bullets Per Minute.
It’s up to you to experiment, but this course should give you a good starting point to make rhythm-based mechanics.
To follow along, you should be comfortable reading commented blocks of code, navigating the editor, and creating scenes and nodes without step-by-step instructions.
You can find the fully completed project in the rhythm game repository, as well as in the course’s download.
It comes with a starter project in the start-project/
directory. In it, you’ll find:
/RhythmGame/AutoLoad/
folder for autoloaded scripts./RhythmGame/Editor/
folder with sprites to use with the pattern editor./RhythmGame/Hits/
folder with sprites for objects that spawn./RhythmGame/Tracks/
folder has separate folders for each music track containing the .ogg
music file and the track icon./RhythmGame/UI/
folder with all assets to do with the user interface (font, buttons, etc.)/RhythmGame/VFX/
folder with sprites for the visual effects.Let’s take a look at what you’ll create. If you open up and run the final project, you’ll be greeted with the following track selection menu. There are three tracks in the track carrousel along the top of the game window. Each track is represented by its track icon.
The project only uses Left-click as an input, so it’s accessible and works on touch devices.
The track carrousel is navigated by using Left-click and dragging horizontally. You can also use your finger on touchscreens.
Clicking the Go! button will start the selected track and begin showing objects the player can interact with.
In the image above, we have:
HitBeat
, a single bear you touch or click to in sync with the song’s beat. The more accurate the timing, the more points you earn.HitRoller
, made of two buttons. You click on the first button and then drag drag along the path as the roller moves. Keep following along the path for a higher score.When the track completes, the end screen displays a thank you message and a button that returns the player to the track selection menu.
This concludes the overview of the project. We’ll go into more detail as we progress through the course.