forum

Developing a simple osu mania game

posted
Total Posts
3
Topic Starter
specy_wot
Hi, i was gonna create a sort of osu mania game on my webapp. Currently the webapp is for composing music, and had the idea to connect the composed song to a beatmap. I was gonna start development one of those days but i wanted to get inspiration by osu and how the game handles beatmap creation and also the actual game inner workings.

My biggest concern is doing the animation and hit calculation, what i was thinking is to have a game loop which runs at every frame, and in this game loop the current timestamp is slowly increased. At every tick i check if there are any notes which have timestamp within, idk, 1 second from the current one, if it is, i remove them from the song notes and add them to the actual game. At every tick i also check the current position of the note by calculating the height based off how distant the note timestamp is from the current timestamp.

Once the player hits a key, it checks if there are any notes in the currently visible notes which are within, idk, 50ms from the end, and from that calculate if it was a correct note press or not.

I wondered if there is someone that could explain to me how osu manages the playback of the song, so that i can try to make it as best as i can. Thanks!
abraker
osu! is a rather complicated system for which there is no clear cut documentation. You can fiddle with its code https://github.com/ppy/osu

Tho if you want it to be as close to osu as possible I'd recommend reimplementing your webapp to use the osu!framework at that point: https://github.com/ppy/osu-framework
HoosierTransfer
i have hit calculation in my osu mania copy

you can use the code if u want

https://github.com/HoosierTransfer/Open-Mania/blob/main/Assets/Main.cs
Please sign in to reply.

New reply