rmtew / incursion-roguelike

The legendary computer game Incursion: Hall of the Goblin King!
https://incursion-roguelike.net/
Other
5 stars 1 forks source link

Simplest path to automated testing #8

Open rmtew opened 1 month ago

rmtew commented 1 month ago

Without devolving into complicated to develop and maintain boondoggles it would be good to be able to have some form of automated testing.

Random ideas:

HexDecimal commented 4 weeks ago

I'm not sure we really need new tests at the moment when the current code already has known issues (compiler warnings).

Random user input / basic fuzzing.

For world logic fuzzing the game can be run with NPC's alone.

Write an ANSI control code frontend.

Record input and replay deterministically. Use to recreate game state.

If keeping the game stable is important then an detailed morgue file could be created which includes commands and stats. Replying the commands and seed from a morgue file should recreate the morgue file exactly, but this would break on any balance or world generation changes unless older balance data is tracked and used.

rmtew commented 4 weeks ago

All those issues are likely in fragile code where we want to know if there are regressions. Logging the commands and seed and morgue would probably be, as you suggest, possibly the simplest way to do this.

Intentional balance and world generation changes can be frozen, or possibly done so atomically that any logs for replay and comparison could be updated after assuming there are no unrelated regressions and it is safe to do so.