oshu icon indicating copy to clipboard operation
oshu copied to clipboard

Test the beatmap module

Open fmang opened this issue 8 years ago • 0 comments

Writing unit tests for a game is no easy task, but fortunately some modules are pure and easy to test. In particular, the beatmap parser and the geometry module.

When playing the following beatmaps, I can't help but feel like the sound effects are… weird:

  • 431396 SENTIVE - Tsuki Usagi -Gekkouyoku- [Lyric's Usagi]
  • 651934 Kaori Oda - Zero Tokei (Short ver.) [Shining]
  • 596833 96neko - Aimai Elegy/96neko - Aimai Elegy (Lasse) [Hard]

It's probably gonna be a tedious task, but I believe the best way to validate the hit parser would be to record an autoplay from the official osu! game and manually identify the played sound samples for the first dozens of hit objects. Then, write that using oshu!'s beatmap structure in a unit test, and check that the parser does interpret the correct thing.

Note that the parser module applies inheritance when parsing, so what appears in the resulting structure is ready to use by the game, and not exactly what's written in the beatmap file. Let's really focus on the expected result from the actual osu! game, rather than guess what the beatmap means.

fmang avatar Jan 08 '18 21:01 fmang