Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit generated events to 50 events per tick #206

Open
ScribbleTAS opened this issue Jun 1, 2024 · 3 comments
Open

Limit generated events to 50 events per tick #206

ScribbleTAS opened this issue Jun 1, 2024 · 3 comments
Labels
Bug Something isn't working Core Issue relates to core concepts
Milestone

Comments

@ScribbleTAS
Copy link
Member

ScribbleTAS commented Jun 1, 2024

In 1.12, a maximum of 50 events can be executed per tick due to LWJGLs buffer sizes. TASmod circumvents this limitation, by polling all inputs as they come in. You can see this in the form of GUIs. Moving the mouse and rearranging items is considered an event, so there are a finite amount of gui actions you can do within a tick. With TASmod you can do infinite actions which is not vanilla. Therefore, I should limit the amount of events that can be generated with TASmod.

Note

TASmod has some filtering built in, reducing the amount of events when recording guis in Tickrate 0

@ScribbleTAS ScribbleTAS added Bug Something isn't working Core Issue relates to core concepts labels Jun 1, 2024
@ScribbleTAS ScribbleTAS added this to the Beta1.0 milestone Jun 1, 2024
@ScribbleTAS ScribbleTAS changed the title Limit generated events to 50 events per tock Limit generated events to 50 events per tick Jun 1, 2024
@PancakeTAS
Copy link
Member

i'm not sure how you're gonna implement this.. because of subticks. some inputs have the 50-limit per frame and some per tick..

@ScribbleTAS
Copy link
Member Author

i'm not sure how you're gonna implement this.. because of subticks. some inputs have the 50-limit per frame and some per tick..

The 50 input limit is always per tick and never per frame I think... Of course it's different in 1.16 where there is no limit iirc, but in 1.12 lwjgls buffer is filled in a tick and only emptied at the end of the tick... TASmod also still works this way, the subticks also only get processed at the end of a tick, which generates a queue of inputevents:
https://github.com/MinecraftTAS/TASmod/blob/develop/src/main/java/com/minecrafttas/tasmod/virtual/VirtualInput.java#L196

I think I can limit the capacity of this queue and then a similar effect will occur...

@ScribbleTAS
Copy link
Member Author

ScribbleTAS commented Jun 1, 2024

Well there is the issue that TASmod might generate more input events than subticks

Going from W,LCONTROL to unpressed will generate 2 events for one subtick, and character input might also create more events than in vanilla... So you'll never know if the subticks get ignored or executed if it comes down to it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Core Issue relates to core concepts
Projects
Status: Todo
Development

No branches or pull requests

2 participants