MinecraftTAS / TASmod

Minecraft Tool-Assisted Speedrun (TAS) Tools with input playback
https://discord.gg/jGhNxpd
GNU General Public License v3.0
30 stars 5 forks source link

Refactor VirtualInput #178

Closed ScribbleTAS closed 8 months ago

ScribbleTAS commented 1 year ago

VirtualInput has been a place for just chucking in functionality when needed... It is responsible for loading inputs, preloading savestates, debugging... All stuff that is suited better elsewhere.

And that also leads to #164

PancakeTAS commented 1 year ago

i thought a little more about just storing the packets directly because it would make things much simpler, but I think if you do wanna go for it it'll be a bit of a struggle in terms on mouse rotation and movement. You know in 1.0 there's no server meaning lag won't cause desync but in 1.12.2 you obviously sometimes get a packet from the server on the frame thread meaning it might desync...

ScribbleTAS commented 1 year ago

So I had a lot of advantages with this system. Stiching 2 input sequences together, like for savestates is much easier with this system... Editing and displaying inputs tick by tick might also be easier.

The big downside is of this is that adding subtick stuff is very annoying... I didn't know about #167 so the solution will be a bit hacky, but then we will have a hybrid of the 2 systems...

ScribbleTAS commented 11 months ago

I don't know why I didn't realize this earlier... I still have a bit of an issue with the fact that I'm storing the entire keyboard for every tick... this wastes a lot of memory... so why not store only the inputs that are pressed in each tick... The more you press, the greater the memory footprint, but wth, why didn't I think of this...