Post subject: GoldSource TAS tool (Half-Life and expansions / mods)
YaLTeR
He/Him
Joined: 12/2/2011
Posts: 129
Location: Moscow, Russia
Hello! Bunnymod XT (BXT for short) is an external injection tool for Half-Life and mods, which contains speedrunning-related functionality as well as TASing functionality. It's cross-platform and open-source: https://github.com/YaLTeR/BunnymodXT The built files can be downloaded there in the releases section. The TASing functionality operates with input files (.hltas), through which you can do all the things you can expect from a TASing tool from frame-by-frame input to game resets (which are, for example, required for RNG manipulation). Since the GoldSource games have such a sophisticated movement, BXT also contains various functionality like automatic strafing (to achieve the best possible acceleration / turn speed / decceleration / etc), which is controlled through the input files as well. Here's a VOD of a stream I did explaining the process of making a TAS: http://www.twitch.tv/yalter/v/7358944 Here's a document explaining the .hltas format: https://docs.google.com/document/d/1YhSCKDVK9UX3lsAMkGABcn5rN1_39DfgDzm0nsqkK_Q Here's a lot of information about Half-Life movement: https://tastools.readthedocs.org/en/latest/ Here's a video of me showcasing and explaining a bunch of awesome GoldSource TASes: https://youtu.be/afLjJMmKvNU?t=21m10s Here's a sheet with various GoldSource TASes (only some of the newest ones use Bunnymod XT because the tool is fairly new): https://docs.google.com/spreadsheets/d/1J53EGbAl3dASEsda0gEg-oVqtPm9sGHmy59sORU3GJM/edit?usp=sharing Some TASes made with Bunnymod XT: Input file: http://pastebin.com/z6fPJ4rM Link to video Input file: http://pastebin.com/zzmXMdPr Link to video Input file: http://pastebin.com/ZQ9Y69wN Link to video Input file: http://pastebin.com/pRPRhkXR Link to video
YaLTeR
He/Him
Joined: 12/2/2011
Posts: 129
Location: Moscow, Russia
While there hasn't been much interest in GoldSource TASing among this forum's members who are not also present in the SourceRuns community, I feel that it is important to post about this update here because of just how much it improves and speeds up the process. The recently released Bunnymod XT update introduces an in-game interactive editor for GoldSource TASes which greatly simplifies and speeds up the process of TAS creation. Following is a video introducing the editor and showing how to get started making a TAS of a bhop map. Link to video Of course the editor can also be used to TAS the game itself. The video is focused on a bhop map because it presents a simpler case which is easy to get into.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3808)
Joined: 11/30/2014
Posts: 2828
Location: US
That's awesome! There sure is a lot of cool stuff happening out there right now.
Editor, Skilled player (1438)
Joined: 3/31/2010
Posts: 2108
Holy crap, this is amazing. Probably the most innovative thing I've seen related to TASing in a long while. Huge props to you for making this. I do wonder how well this works with some of the actions required in the base game, like shooting, boosting from func_pushables or riding trains. Great work at any rate.
YaLTeR
He/Him
Joined: 12/2/2011
Posts: 129
Location: Moscow, Russia
scrimpeh wrote:
Holy crap, this is amazing. Probably the most innovative thing I've seen related to TASing in a long while. Huge props to you for making this.
Thanks!
scrimpeh wrote:
I do wonder how well this works with some of the actions required in the base game, like shooting, boosting from func_pushables or riding trains.
Yeah, I think interacting with entities will still need to be adjusted manually. The editor works via the player movement prediction, implemented as a library, which doesn't do entity prediction. I was thinking about perhaps somehow predicting at least a number of "simple" entities like doors and pushables, however thus far I'm not sure how to go about doing this. One idea is to run the server physics together with the movement prediction, however you essentially need savestates to be able to roll the server state back to predict another movement angle, and that's something we don't have in GoldSource (and can't be easily implemented). Another idea is to re-implement the position updating for simpler entities (like doors) and move them back and forth manually during prediction, however I don't know how well that would interact with the rest of the game's state. In any case, this is what I would probably try first if there isn't a better idea.
YaLTeR
He/Him
Joined: 12/2/2011
Posts: 129
Location: Moscow, Russia
A year of improvements has made the last video outdated, so I made a new one covering the improved TASing workflow and generally more in-depth. Link to video The notable improvement since a year ago is that the camera twitching is now gone completely. For a taste of how HL TASes look now, check the Office Complex TAS: Link to video Also, some more TASVideos-related work that's happened: in spring we worked with keylie to improve libTAS support for HL1 to the point of successfully exporting Bunnymod XT TASes using all kinds of complex things like mouse, joystick inputs and variable framerate to libTAS. However, this is still "work in progress". 1. The converter in BXT still has some bugs (I saw it output 1 pixel off mouse movement on one frame which broke everything). 2. I don't know if/how things involving serverside physics will sync. Player movement uses time floored to 1 ms which is easily replicated by libTAS, but serverside physics uses full precision floating point time, which will likely be different between the way BXT sets it (in-game host_framerate console variable) and the way libTAS sets it (feeding the game timestamps). This will probably need special support in BXT to feed timestamps the same way as libTAS during TASing. 3. I similarly don't know how to hook up RNG between BXT and libTAS. Right now I imaging something like TAS up to RNG part, play back in libTAS, check the RNG values, then somehow plug them back into the game via BXT to TAS the RNG part and hope it all works out?
YaLTeR
He/Him
Joined: 12/2/2011
Posts: 129
Location: Moscow, Russia
We're one more year into the future, which means it's time for another update. When thinking about how a theoretical libTAS + Bunnymod XT TASing setup would look like, I came up with an idea that I could play back the TAS in a libTAS game instance to get the real player movement, then display it in a second game instance running the Bunnymod XT TAS editor and tools. I then quickly realized that this idea works just fine without libTAS, so now we have fully-accurate player path when TASing with the Bunnymod XT TAS editor! Including all entity interactions and everything. I also stumbled upon batman's wonderful CSS surf TASes, where I got another idea—global camera smoothing. I implemented it as part of a new in-game TAS camera editor, further reducing the need for manually editing .hltas scripts as text files. You can get a glance at how both of these improvements work in this video: Link to video And you can check how a TAS made with global smoothing looks here: Link to video Even if I don't manage attract any new HL1 TASers by posting here, I hope that the TAS editor work could inspire or give useful ideas to enable or improve TASing of other games.
Dimon12321
He/Him
Editor, Reviewer, Experienced player (595)
Joined: 4/5/2014
Posts: 1217
Location: Romania
YaLTeR wrote:
And you can check how a TAS made with global smoothing looks here: Link to video Even if I don't manage attract any new HL1 TASers by posting here, I hope that the TAS editor work could inspire or give useful ideas to enable or improve TASing of other games.
Wow, that looks awesome! I'm slowly losing a stereotype of HL1 TASes having a jittery camera. I think that's because there are enough YT channels which upload TAS movies of BHop-designed maps. When it comes to all other GoldSource stuff, the main obstacle are countless nuances of the game that could be used for speedrunning purposes and people don't feel like learning all this. I noticed that quadrazid made some CS 1.6 TAS videos that don't feature any team battles (bots). Can their actions be replayed without desyncs, so I could build TAS-looking team deathmatches with headshots?
TASing is like making a film: only the best takes are shown in the final movie.
YaLTeR
He/Him
Joined: 12/2/2011
Posts: 129
Location: Moscow, Russia
Dimon12321 wrote:
I noticed that quadrazid made some CS 1.6 TAS videos that don't feature any team battles (bots). Can their actions be replayed without desyncs, so I could build TAS-looking team deathmatches with headshots?
In theory yes, in practice it would be annoying to work with, especially if the bots' AI calls the RNG. Playing with bots usually means local multiplayer, which is not a tested/supported environment for TASing, but I imagine it shouldn't cause too many issues to support on a basic level. CS 1.6 specifically also requires special support due to slightly different physics (and the multiplayer requirement), quadrazid made his TASes on an old (pre TAS editor) special BXT build with CS 1.6 support, which I never updated past that point.
Dimon12321
He/Him
Editor, Reviewer, Experienced player (595)
Joined: 4/5/2014
Posts: 1217
Location: Romania
YaLTeR wrote:
In theory yes, in practice it would be annoying to work with, especially if the bots' AI calls the RNG. Playing with bots usually means local multiplayer, which is not a tested/supported environment for TASing, but I imagine it shouldn't cause too many issues to support on a basic level.
What about CS: Condition Zero Deleted Scenes? Bots' AI seems to be similar to soldiers' AI from HL.
TASing is like making a film: only the best takes are shown in the final movie.
YaLTeR
He/Him
Joined: 12/2/2011
Posts: 129
Location: Moscow, Russia
Dimon12321 wrote:
What about CS: Condition Zero Deleted Scenes? Bots' AI seems to be similar to soldiers' AI from HL.
Not sure, never looked into it.
Active player (469)
Joined: 3/30/2012
Posts: 405
This is really cool! I love how the camera smoothing works.
Post subject: TAS tools updates
YaLTeR
He/Him
Joined: 12/2/2011
Posts: 129
Location: Moscow, Russia
The TrackMania TAS tools, apart from hundreds of awesome TASes, gave me inspiration with their brute-forcer. So, I implemented a brute-force optimizer for Half-Life. Here's a video on how to use it and how it works: Link to video Despite the simplicity and speed, it actually works surprisingly well and finds real skips and real improvements. I hope that other games can benefit from this idea too. In particular, this TAS had a ton of help from the optimizer, including finding two ridiculously precise skips: Link to video I made the above TAS using the new "camera wiggle" strafing style, which mimics human strafing camera movement (also inspired by batman's surf TASes). There's a little bit of timeloss because the path that the player takes is not a straight line, but it's pretty minor from some comparisons I did. Finally, the CS 1.6 TASing support is back in the latest BXT release. The contributor who worked on it also TASed a number of very hard kz maps: Link to video
YaLTeR
He/Him
Joined: 12/2/2011
Posts: 129
Location: Moscow, Russia
When I made TAS editor 1 I was trying to get something working as fast as possible so that I don't run out of motivation. As you can imagine, this has lead to subpar code quality and design. So for a while I've been thinking of a way to architecture the TAS editor properly™ while making it much more powerful. So, several months of work later, here we are. I've made TAS editor 2. Link to video Some highlights are:
  • Undo/redo system which is unlimited and persistent: even after restarting your game, you can undo all the way back to the start of the TAS.
  • Branches for easy comparison of different routes.
  • Manual HLTAS editing through bridged file synchronized with the in-game editor in real time.
  • Integration with the TAS optimizer.
  • No save command: all changes are automatically saved to disk as soon as you do them in-game.
Overall, it's the same general workflow, but much less annoying. And here's also a TAS I made with it: Link to video