rosu-renderer
A Rust library for rendering osu! beatmaps using egui. Currently supports mania mode with customizable note styles and real-time playback.
Features
🎵 Mania Mode Support
- Real-time beatmap rendering with customizable playback speed
- Multiple note shapes: Circle, Rectangle, Arrow, and custom images
- Hold note support with customizable body and cap colors
- Adjustable column width and note size
- Scroll speed control for different gameplay preferences
🎨 Customization
- Note styling: Choose from predefined shapes or load custom images
- Color customization: Set note colors, hold body colors, and hold cap colors
- Layout control: Adjust column width and note size to match your preferences
- Playback controls: Control playback speed and scroll timing
🖥️ UI Framework
- Built with egui for immediate mode GUI
- Cross-platform support
- Real-time rendering with smooth performance
Installation
Add this to your Cargo.toml:
[]
= "1.1.1"
= "0.32.0"
= "0.32.0"
= { = "0.32.0", = ["image", "file"] }
= "0.2.1"
Quick Start
Basic Usage
use ;
use Beatmap;
// Load your beatmap
let beatmap = from_path.unwrap;
// Create a player with custom dimensions
let mut player = new.unwrap;
// Customize note style
let style = NoteStyle ;
player.set_note_style;
// Set playback speed
player.set_speed;
// Set scroll speed (in milliseconds)
player.set_scroll_time;
// In your egui app update loop:
player.render;
Running the Example
The example provides a full-featured mania mode viewer with:
- File selection for beatmaps
- Real-time playback controls
- Note style selection
- Custom image loading
- Adjustable layout parameters
API Reference
Player
The main struct for rendering beatmaps.
NoteStyle
Customize the appearance of notes.
Supported Game Modes
Currently, only osu!mania mode is supported. Support for other modes (Standard, Taiko, Catch) is planned for future releases.
Dependencies
- eframe: egui application framework
- egui: Immediate mode GUI library
- egui_extras: Additional egui features (image loading, file dialogs)
- rosu-map: osu! beatmap parsing library
- image: Image processing for custom note textures
Development
Building
Running Tests
Running Examples
# Run the mania example
Contributing
Contributions are welcome! Areas that need work:
- Standard mode support
- Taiko mode support
- Catch mode support
- Additional note styles
- Audio synchronization
- Performance optimizations
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built with egui for the UI framework
- Uses rosu-map for beatmap parsing
- Inspired by the osu! game and community
Roadmap
- Add support for Standard mode
- Add support for Taiko mode
- Add support for Catch mode
- Implement audio synchronization
- Add more note styles and effects
- Performance optimizations for large beatmaps
- Export functionality for rendered beatmaps