Open rmtew opened 3 months 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.
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.
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: