-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Description
With PRs such as #2208 where normal code reviews fail we finally need an automatic regression tester.
@fmatthew5876 I could need your help here. I ask you to provide two things. It would help me when you can contribute them (best would be as a seperate PR, so I can use it in both master and your character PR)
My idea is the following:
- Add a "unit test" mode to Player which saves the game each frame
- Replay the input in RPG_RT through injected DLL while saving the game each frame (for synchronization the Game_System.frame_counter is used)
- Compare the save files
- .....
- PROFIT
TODO
- Invent a better input recording format [1] @Ghabry
- Add a new SavegameManager class that provides a Save(int save_id) function. @fmatthew5876 can you help with this? A Load function isn't needed yet but I need a globally accesible Save. [2]
- Write a unit test mode that saves the game each frame (easy to add when Save() exists)
- Write a DynRpg plugin that can replay input and save each frame @Ghabry
- Write an automatic difftool (python based?), could parse lcf2xml output and skip chunks that usually don't match (see [2])
- Record some tests
Known issues
- DynRPG only writes up to Save99.lsd, needs some trickery (file renaming) to record longer
- The recording desyncs when there is a teleport. Is off by 5 frames?!
[1] My suggestion: 6531fd8 The important lines are the "F" lines, the format is game_system_frame,keys..... A frame can occur multiple times because Game_System frames are reset in some cases, but this is no problem.
H EasyRPG Player Recording
V 2
D 2020-08-23-23-27-37
F 45,DECISION
F 0,DECISION
F 5,RIGHT
F 6,RIGHT
[...] <- A line is only written when there was an input in this frame
F 28,RIGHT,UP
F 29,RIGHT,UP
F 30,RIGHT,UP
[2]
Notes about savegame incompatibility
title.timestamp- this varies (obviously)system.sceneis 0 on the mapeasyrpg.version- only we write this
Strange observations
system.save_countwhen using dynrpg save this is always 0system.save_slotwhen using dynrpg save this is always 1
Incompatible save storage
- Player stores
<saveactor><status>0 0 0 0 0 0 0 0 0 0</status>, but RPG_RT stores<status></status>@fmatthew5876 can you fix this? I guess RPG_RT only writes numbers until it reaches all zero.
Lower priority
- Write a program that injects a DLL in RPG_RT that is DynRPG independent and provides the required features
Reactions are currently unavailable