Need help with Rhythm game

TheTypist

Active Member
Donor
Game Developer
Sep 7, 2017
694
4,185
Hey y'all. Im using Rhythm game and I can't seem to figure out how to generate a beat map. If someone has time I'd really appreciate an explanation. While I'm at it, I might as well ask if anyone may be able to incorporate a fail state where if the user doesn't achieve a certain amount of note hits, they fail and get a separate jump state such as "You need to hit 300 notes to win" I'm sure it's trivial but I truly am burnt just trying to figure out how to generate the beatmap for my own audio file i've imported
 
  • Thinking Face
Reactions: quarzo

quarzo

Active Member
Aug 25, 2017
926
817
well, i never try do some like this. but i will try some like:

open the audio file you will use with a audio editor software like audacity. check the exactly times where the drums sounds and create a json with all this info.

create normally your game play with a internal timer.

ensure sincronize the game loop with the audio file.

later on game play, when the player press button, on internal logic, check if the timer when the button was pressed, exist on the json file, then mark a succes cointer or something
 

TheTypist

Active Member
Donor
Game Developer
Sep 7, 2017
694
4,185
well, i never try do some like this. but i will try some like:

open the audio file you will use with a audio editor software like audacity. check the exactly times where the drums sounds and create a json with all this info.

create normally your game play with a internal timer.

ensure sincronize the game loop with the audio file.

later on game play, when the player press button, on internal logic, check if the timer when the button was pressed, exist on the json file, then mark a succes cointer or something
The above link is an already created game that can accept beat maps and create a pattern similar to an older game like guitar hero. What I need help with is within the code there is a python file that can be executed and create a beat map for an audio file that you give to it somehow, where I’m struggling is giving it the audio file to generate a beat map using the already existing script
 

Niv-Mizzet the Firemind

Active Member
Mar 15, 2020
574
1,120
The above link is an already created game that can accept beat maps and create a pattern similar to an older game like guitar hero. What I need help with is within the code there is a python file that can be executed and create a beat map for an audio file that you give to it somehow, where I’m struggling is giving it the audio file to generate a beat map using the already existing script
Let's assume you have the file whatever.mp3 in the folder game/audio/.
You copy the contents of the folder 00-renpythm-utils in the game/ subfolder, go into it and open a terminal there (in windows you press file -> open windows powershell).
Then you type: python generate_beatmap.py audio/whatever.mp3. This will create whatever_beatmap.txt in the audio subfolder.