All Projects → RuolinZheng08 → renpy-rhythm

RuolinZheng08 / renpy-rhythm

Licence: MIT license
A light-weight rhythm game engine with auto beat map generation built with Ren'Py

Programming Languages

python
139335 projects - #7 most used programming language
c
50402 projects - #5 most used programming language
Ren'Py
26 projects
fortran
972 projects

Projects that are alternatives of or similar to renpy-rhythm

LearnToCodeRPG
A visual novel video game where you learn to code and get a dev job 🎯
Stars: ✭ 853 (+1572.55%)
Mutual labels:  renpy, renpy-visual-novels
language-renpy
📑 🔌 Ren'Py package for Atom and Linguist Grammars
Stars: ✭ 42 (-17.65%)
Mutual labels:  renpy
Chunithm-Research
An in-depth document about Chunithm via reverse engineering.
Stars: ✭ 28 (-45.1%)
Mutual labels:  rhythm-game
Translator3000
Automatic translator of games made on Ren'Py engine.
Stars: ✭ 78 (+52.94%)
Mutual labels:  renpy
danoniplus
🍙 Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game
Stars: ✭ 27 (-47.06%)
Mutual labels:  rhythm-game
renpy-text-editor
Renpy Text Editor - A dedicated text editor for the RenPy Engine.
Stars: ✭ 30 (-41.18%)
Mutual labels:  renpy
fae-mod
In "Forever & Ever", you can become closer to Sayori than ever before! You have all the time in the world to build the perfect relationship with our cinnamon bun as the star of the show.
Stars: ✭ 42 (-17.65%)
Mutual labels:  renpy
ddlc-android
[WIP] "Doki Doki Literature Club!" Android port
Stars: ✭ 68 (+33.33%)
Mutual labels:  renpy
yamayami
Yamayami(ヤマヤミ/止マナイ雨ニ病ミナガラ) ported to Ren'Py.
Stars: ✭ 23 (-54.9%)
Mutual labels:  renpy
oshu
Fast osu! port for Linux (and more)
Stars: ✭ 106 (+107.84%)
Mutual labels:  rhythm-game
Kade-Engine
Kade Engine is a Competitive Rhythm Game engine rewrite for FNF with Quality of Life features included.
Stars: ✭ 400 (+684.31%)
Mutual labels:  rhythm-game
ProjectFNF
ProjectFNF 2.0, based on Psych Engine
Stars: ✭ 22 (-56.86%)
Mutual labels:  rhythm-game
iivx
[outdated] Beatmania IIDX and Sound Voltex hybrid controller
Stars: ✭ 45 (-11.76%)
Mutual labels:  rhythm-game
BMP-U
🍌BananaBeats - Yet-another BMS rhythm game!
Stars: ✭ 76 (+49.02%)
Mutual labels:  rhythm-game
Pulsus
Open source rhythm game and BMS simulator/player written in C#
Stars: ✭ 33 (-35.29%)
Mutual labels:  rhythm-game
Renpy
The Ren'Py Visual Novel Engine
Stars: ✭ 2,734 (+5260.78%)
Mutual labels:  renpy
DDLCModTemplate2.0
A new template for producing DDLC mods that adhere to Team Salvato's guidelines based off DDLC itself.
Stars: ✭ 22 (-56.86%)
Mutual labels:  renpy
vgprompter
C# library to parse a subset of Ren'Py script syntax
Stars: ✭ 17 (-66.67%)
Mutual labels:  renpy
VisualNovelKit
Combo of addons + template to create narrative games in Godot inspired by Ren'Py
Stars: ✭ 78 (+52.94%)
Mutual labels:  renpy
renpy-chess
A chess GUI built with Ren'Py, python-chess, and Stockfish. Version 2.0 of https://github.com/RuolinZheng08/renpy-chess-engine
Stars: ✭ 36 (-29.41%)
Mutual labels:  renpy

Ren'Py Rhythm: A Rhythm Game Engine for Ren'Py

Play it now on itch.io or watch a demo on YouTube

About

Ren'Py Rhythm is a rhythm game engine built with the Ren'Py Visual Novel Engine and Aubio, a libraray for audio labeling. Aubio is used to automatically generate beat map for any custom audio file.

You can use this project as a standalone playable or integrate it as a minigame into a Ren'Py visual novel project, using any music you like and have the beat map automatically generated for you. Read the guide for integration below.

Compatibility

This project is built with Ren'Py SDK >= 7.4.0 and is also compatible with Ren'Py SDK <= 7.3.5.

Gameplay Demo

Use the four arrow keys on your keyboard to play the game. A Good hit scores 60, and a Perfect hit scores 100. Hitting the note too early results in a Miss.

Gameplay Example

The game also supports a high-score system stored in Ren'Py's persistent object store.

High Score System

Guide for Integrating into a Ren'Py Project

All of the files essential to the engine are in game/00-renpythm. Therefore, you only need to copy the entire 00-renpythmdirectory into your Ren'Py game directory.

Structure of 00-renpythm

00-renpythm/
    - images                        # music note images
    - rhythm_game_displayable.rpy   # core GUI class

The core GUI class is a Ren'Py Creator-Defined Displayable named RhythmGameDisplayable inside rhythm_game_displayable.rpy.

To call the rhythm game displayable screen, all you need is a audio file and its corresponding beat map text file. The utilities to automatically generate beat map files is included in 00-renpythm-utils and the procedure is described below in details.

Take for example a file in game/audio named my_music.mp3. Its full path is audio/my_music.mp3 which you need to pass to the rhythm_game screen. (Also see the game/script.rpy file in this repo for more examples.)

window hide
$ quick_menu = False

# avoid rolling back and losing chess game state
$ renpy.block_rollback()

call screen rhythm_game('audio/my_music.mp3', 'audio/my_music.beatmap.txt', beatmap_stride=2)

# avoid rolling back and entering the chess game again
$ renpy.block_rollback()

# restore rollback from this point on
$ renpy.checkpoint()

$ quick_menu = True
window show

$ num_hits, num_notes = _return
"You hit [num_hits] notes out of [num_notes]. Good work!"

Automatic Generation of Beat Map Files

This project leverages the onset detection feature in Aubio's Python module to automatically generate beat map for any audio file. The script to generate a beat map is 00-renpythm-utils/generate_beatmap.py.

You will need to have Python to run this script instead of using the Python provided by Ren'Py. This script is developed using MacOS's default Python 2.7.16.

Usage: python generate_beatmap.py [input]

As an example, python generate_beatmap.py audio/my_music.mp3 will generate audio/my_music.beatmap.txt.

The script can also be run on an entire directory, python generate_beatmap.py audio/ will take all valid audio files and generate their beat maps.

beatmap.txt is really just a text file with floating point numbers separated by newlines, each denoting when a note should appear. It's usually a couple hundred lines long, meaning that the song has a couple hundred notes. It may look like below, where the first note appears 0.0259 second into the song and the last note shown appears 2.7948 seconds into the song. See those game/audio/*.beatmap.txt for more information.

0.0259
0.4201
0.8147
1.2137
1.6092
2.0036
2.3981
2.7948

Manually Specifying a Beat Map

You may also manually create your beat map text file, as long as it adheres to the format shown above.

Adjust Difficulty Levels

If you are looking for ways to implement different difficulty levels. The following variables may be of interest:

  • RhythmGameDisplayable.note_offset which affects RhythmGameDisplayable.note_speed computed as note_speed = config.screen_height / note_offset. note_offset is the total time in seconds it takes for a note to scroll vertically across the screen. Hence, a smaller note_offest results in a larger note_speed - faster moving notes - and increases the game's difficulty.
  • The beatmap_stride passed to the constructor of RhythmGameDisplayable. This must be a non-negative integer and defaults to 2. A smaller beatmap_stride like 1 will result in drastically more notes appearing on the screen, increasing the game's difficulty.

Continuous Development and Contribution

The project is under active maintenance and development. Please feel free to submit a GitHub issue for bugs and feature requests. Please also feel free to contribute by submitting GitHub issues and PRs.

Music File Credit

All music files are copyright free ones found on SoundCloud.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].