fmang / oshu

Fast osu! port for Linux (and more)
GNU General Public License v3.0
120 stars 8 forks source link

Design a better beatmap format #46

Closed fmang closed 6 years ago

fmang commented 6 years ago

The format of the .osu files is silly, and sometimes I think it might be worth the effort to make a beatmap compiler.

Because compiling a beatmap doesn't require any kind of performance, this could be written in a super high and slow language, and generate a MessagePack with all the computations done. oshu! would then just load it naively.

In particular:

That format could hopefully become a candidate for a future official format!

If the MessagePack is limited to scalars, lists and maps, it might as well be JSON, YAML or whatever. The serialization in itself is irrelevant, yay. gzip could be added on top of it, if needed.

But first, I should finish my work on the .osu wiki article: https://github.com/ppy/osu-wiki/issues/811

Maybe then #44 comes first still, to ensure the current parser could be used as a reference. Alternatively, this issue might become handy because comparing a serialized MessagePack with a reference result is super easy.

fmang commented 6 years ago

I now feel like it's unrelated to oshu!, because we have to support the osu! beatmap format anyway. Once the parser is isolated into a simple load function, it's the same to the caller whether it's a smart format or not.

If there was a significant performance gain from pre-compiling the beatmaps, that's another story, but I don't think it'd be significant.

https://xkcd.com/927/