I wanted to see if it's possible to do stuff inside a Construct 3 game in sync with the beat of song playing inside a YouTube embed.

How this works:

First of all we need need to grab some audio from YouTube and make a beatmap for it that look like this:

0.441179
0.870748
1.30032
1.72989
2.15946

...et cetera. Essentially a TXT file that contains timestamps of the beats. If you're lazy like me, you can use yt-dlp to download a video and convert it to WAV, then you might want to buy Crypt of the NecroDancer on Steam, install the Windows version and find beattracker.exe inside the data\essentia folder and pass it the WAV file to get a pretty decent beatmap (depending on the song of course).

The project loads the YouTube IFrame API and the pre-prepared beat map, starts playing the video and constantly monitors the playhead's position to check for nearby beats. That's about it.

Did I mention you can seek too?

Published 9 days ago
StatusPrototype
CategoryOther
PlatformsHTML5
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorFodi
Made withConstruct
Average sessionA few seconds
InputsMouse, Touchscreen

Leave a comment

Log in with itch.io to leave a comment.