Lightweight, cross-platform and simple osu! memory reader written in Rust
Currently rosu-memory tries to auto-detect your osu! folder from running osu! process. This means you can simply run it without providing additional arguments
But just in case you can always overwrite auto-detected path. Instructions on how to do that are listed below.
On Linux auto-detection doesn't work in cutting edge
- Select any ported counter/overlay (you can see some inside
examples
folder) - Open OBS
- Add to your scene
Browser Source
- Click on
Local File
checkbox - Choose
index.html
file inside counter/overlay folder - Done!
There are two primary methods
- By setting environment value in windows settings (recommended):
- Type
Edit the system environment variables
in your search bar, press enter - In opened window click
Environment variables
at the very bottom - Click
New...
underSystem Variables
- In
Variable name
type OSU_PATH - In
Variable value
type your path to osu! folder - Click
Ok
- Now you can start rosu-memory simply by double clicking
rosu-memory.exe
file!
- Type
- By editing batch file:
- Open
windows_start.bat
file in your preferred text editor - Change
set OSU_PATH=%HOMEDRIVE%%HOMEPATH%\AppData\Local\osu!
toset OSU_PATH=<YOUR OSU PATH>
- Start rosu-memory by opening
windows_start.bat file
(Note:rosu-memory.exe
andwindows_start.bat
should be in the same folder)
- Open
- Download binary or compile it by yourself
- Set OSU_PATH environment variable or run rosu-memory with
--osu_path
argument
-
Small binary size
rosu-memory gosumemory (v 1.3.8) tosu (v 1.3.0) Windows 0.9 MB 21 MB 35 MB Linux 1.2 MB 21.2 MB Does not support -
Low RAM usage. Since Rust is a compiled language and doesn't have any garbage collection (as opposed to gosu and tosu), it has very low (almost minimal) RAM usage.
-
Low CPU usage
-
It's blazingly fast compared to other readers. We are using gradual pp calculation, which means we don't recalculate the whole beatmap each iteration, only calculating new objects that have been passed.
-
Background image appears almost instantly (if you used other readers you know that this is really big problem for them)
-
Statically linked binary, no runtime dependencies required (except win32 and glibc)
-
Can be compiled using musl libc!
-
Cross-platform
-
Different JSON schema. Small disadvantage, but rosu-memory outputs slightly different JSON than tosu and gosu. Please consider this when porting your counter to rosu-memory. (See examples folder :) )
- Not all osu! data is present yet. But everything that is required to make simple counter is present :)
- Strains graph
- Any tournament stuff
- And many others :)
{
"skin": "lain's skin",
"playtime": 78624,
"menu_mode": 0,
"state": 5,
"stars": 6.772433558139333,
"stars_mods": 6.772433558139333,
"current_stars": 6.486382070844266,
"result_screen": {
"username": "",
"mods": 0,
"mode": 0,
"max_combo": 0,
"score": 0,
"hit_300": 0,
"hit_100": 0,
"hit_50": 0,
"hit_geki": 0,
"hit_katu": 0,
"hit_miss": 0,
"accuracy": 0
},
"gameplay": {
"mods": 0,
"username": "Guest",
"score": 0,
"hit_300": 0,
"hit_100": 0,
"hit_50": 0,
"hit_geki": 0,
"hit_katu": 0,
"hit_miss": 0,
"accuracy": 0.9141824751580849,
"combo": 0,
"max_combo": 0,
"mode": 0,
"slider_breaks": 0,
"unstable_rate": 0,
"passed_objects": 0,
"grade": "B",
"current_hp": 0,
"current_hp_smooth": 0
},
"beatmap": {
"artist": "Eternal Tears Of Sorrow",
"title": "Another Me",
"creator": "LMT",
"difficulty": "Insane 1.36x (250bpm) CS4.2 AR9.6 OD9",
"map_id": 2643167,
"mapset_id": 1271974,
"ar": 9.6,
"cs": 4.2,
"hp": 5,
"od": 9,
"beatmap_status": 2,
"last_obj_time": 167310,
"first_obj_time": 150,
"bpm": 250,
"paths": {
"beatmap_full_path": "/path/to/osu/Songs/1271974 Eternal Tears Of Sorrow - Another Me/Eternal Tears Of Sorrow - Another Me (LMT) [Insane 1.36x (250bpm) CS4.2 AR9.6 OD9].osu",
"beatmap_folder": "1271974 Eternal Tears Of Sorrow - Another Me",
"beatmap_file": "Eternal Tears Of Sorrow - Another Me (LMT) [Insane 1.36x (250bpm) CS4.2 AR9.6 OD9].osu",
"background_file": "night-3129908_1920.jpg",
"background_path_full": "/path/to/osu/Songs/1271974 Eternal Tears Of Sorrow - Another Me/night-3129908_1920.jpg"
}
},
"keyoverlay": {
"k1_pressed": false,
"k1_count": 0,
"k2_pressed": false,
"k2_count": 0,
"m1_pressed": false,
"m1_count": 0,
"m2_pressed": false,
"m2_count": 0
},
"current_bpm": 0,
"kiai_now": false,
"current_pp": 469.34991682892615,
"fc_pp": 0,
"ss_pp": 469.34991682892615,
"menu_mods": 0,
"mods_str": [],
"plays": 7
}
- All gameplay data is reset when leaving
Playing
state, so you don't need to do this manually in your counter current_pp
changes depending on state:SongSelect
- Shows SS pp's for currently selected mapPlaying
- gradually calculates pp's based on your progress into beatmap and gameplay modsResultScreen
- calculates pp for score that appears on result screen
unstable_rate
- converts itself according to gameplay modsfc_pp
- removes misses of scores when playingss_pp
- uses mods based on your current statemods_str
changes depending on state:SongSelect
- uses menu modsPlaying
- uses gameplay modsResultScreen
- uses result_screen mods
current_stars
- calculates stars gradualy based on your progress into beatmap and gameplay modsplaytime
changes depending on state:SongSelect
- represents progress of mp3Playing
- represents your progress into current beatmap
Around ~600 ms
The Sun The Moon The Stars +DT (x2 replay)
~190usPlasma Gun [Extreme] +HDDT
~90us
You can use tracy to profile rosu-memory
.
Just build rosu
with --features tracy-profile
argument and then connect to client.
Options:
-o, --osu-path <OSU_PATH> Path to osu! folder [env: OSU_PATH=]
-i, --interval <INTERVAL> Interval between updates in ms [default: 300]
-e, --error-interval <ERROR_INTERVAL> Amount of seconds waiting after critical error happened before running again
-h, --help Print help