Windswept Autosplitter
Windswept is a buddy platformer released in 2025. I really enjoyed the game when I played it and I decided to speedrun it.
LiveSplit is a standard tool for speedrunning. It's a timer - you start it at the start of the run; there's a hotkey to stop the timer. The other big feature is "splits", a set of milestones for your speedrun. There's a hotkey for "move on to the next split", and LiveSplit records how long each split took. The idea is that you could use splits to track things like how long each level of a game took, or some other milestone along the speedrun route, and get a sense of your pace.
Hitting a hotkey to update your split is error-prone - both in the sense that you're unlikely to hit it with millisecond precision and also in the sense that you can forget to hit the hotkey or hit it multiple times or whatever - and it takes some effort that you'd probably prefer to put towards playing game fast. For this reason, LiveSplit has the concept of an "autosplitter", a game-specific script that detects when your game has reached whatever milestone point and... auto-splits. They can also do a couple of other things, like report the game's understanding of time to LiveSplit for use instead of real time (useful if the game pauses its clock during loading screens and the like!)
I decided to make an autosplitter script for Windswept before I did any running, and you can find that script on GitHub.
The language for LiveSplit's autosplitter scripts is called "ASL", and it seems to just be some Roslyn-compiled C# thing. My script has a bunch of useful features:
- it provides game time - very useful for Windswept; the in-game speedrun timer doesn't move on the world map, and the official leaderboard uses in-game time.
- it allows configuring which levels cause a split
- it allows splitting on collecting various collectables (for 100% runs, if they ever happen)
- it can auto-reset the run if you return to the title screen
- it can auto-start the run when you start a new file
LiveSplit provides some tools for inspecting the memory of whichever process you're connected to - the idea is that you use something like Cheat Engine to find fixed addresses you can watch for state variables in the game and then you trigger based on those. Unfortunately most of Windswept's variables aren't stored in a fixed location every run - they're stored on the heap.
Windswept is written in GameMaker; the GML scripts are compiled to machine code via YoYo Games' YYC. I spent some time poking around the Windswept executable in Ghidra to see if I could find the relevant state variables. It turns out that the GameMaker engine - or at least the version used in Windswept - stores all the global variables in a project in a hashmap pointed to by a variable in the .data of the executable. For some reason the hash value used for each variable is also stored at a fixed location in .data and is initialised at runtime.
With some AI assistance I reverse-engineered the hashmap implementation (linear probing with Robin Hood hashing), and I implemented it in the ASL script1 so I could get GameMaker variables like the current in-game time (IGT), the array of cleared stages, arrays for each collectable, and some state variables that track whether IGT is paused. There's also a script in the repo that finds all these addresses in .data so I can quickly update the ASL whenever a new version of the game comes out. It works pretty well!
LiveSplit has a mechanism to automatically distribute ASL scripts for games, and this one is included - so if you use LiveSplit and want to speedrun Windswept you don't have to download anything else; your LiveSplit already has it.
At time of writing (November 2026) my best time is 23:21.650 for any%, which is 11th on the leaderboard, and I also did a run live at ASM 2026.
Why not just do normal pointer chaining? As far as I can tell the bucket each variable is in in the hashmap is consistent between runs of the same version of the game, so this is at least theoretically possible (although maybe vulnerable to the hashmap resizing if new variables get added as the game runs). Probably the easiest way to do this would be to write a script that walks the hashmap looking for the value with the correct hash and records the offset when it finds it, then use those values in the ASL's table of pointer paths for game values. But I'm not sure this would be any easier than just implementing the hashmap lookup myself at runtime. It's arguably a worse solution and I've already RE'd the data structure, so I may as well go all the way.↩︎