What's new in v1.4.3
Here is a summary of the main changes in v1.4.3. You can see the full changelog file here.
New RAM Search
The RAM search feature has been completely rewritten. Previously it was storing all results in memory, and too many results would crash the program. The new implementation is based on what Cheat Engine is doing:
- Store all results on disk, and split memory addresses and memory values into separate files.
- Split the process into multiple threads, each thread writing into its own files. At the end, all files are merged together.
- If we need to read at least two addresses from the same memory page, read the entire page to benefit from caching
- Don’t display results if the result count is above a certain threshold
Improved input editor rewind feature
The ability to change past inputs in the input editor, with an automated state loading and fast-forward, has been useful for the process of TAS making, but it suffered from bugs and limitations when interacting during the state loading. Those limitations and bugs were based on the fact that changing inputs using the input editor was done by the UI thread, while the rest of the input logic (reading from movie file or user keyboard, etc.) is performed in the main thread.
Now, all input modifications in the input editor are sent to the main thread. When they are processed by the main thread, it checks if the modification is valid (e.g. can’t change a past input). In the meantime, input modifications are shown as light gray/dark gray in the input editor. This change allows user to still submit input modifications during the state loading, without the risk of doing invalid changes. Also, a rewind cannot be triggered when another one is happening.
More automated detections
Having to set multiple options before running a game has always been an issue in libTAS. A few modifications have been made to help users with that:
- Autodetect game library folder: libTAS now detects when a library is
missing to launch the game, then tries to locate this library inside the
game directory. If located, it will fill the
LD_LIBRARY_PATH
variable accordingly, so that users won’t have to manually fill the library path. - Suggest time-tracking option: When a game calls a specific
gettime()
function too many times during a single frame, a message is printed on the terminal indicating the user that the corresponding time-tracking option may be needed. - Simplify RAM Search options: Now it offers three meaningful options that can be left by default, instead of showing a list of all memory region types
- Autodetect Unity coroutines: There is a specific hack to make Unity
coroutines to run synchronously from the main thread, but it needed to be
identified for every single Unity engine version. Now it tries to detect the
correct threads from their creation order (which is very fragile, but seems
to work for now). As a note, very recent versions of Unity (e.g.
new Hollow Knight 1.5 version shipping Unity
2020.2.2f1
) don’t work with the deterministic hack, because of how Unity calls thread sync routines. It basically bypasses libc functions and uses kernel futexes directly.