8000 Merge `Input` and `RequestRedraw` events · Issue #739 · gosub-io/gosub-engine · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Merge Input and RequestRedraw events #739
Open
@Sharktheone

Description

@Sharktheone

In #733 there is a channel with events. Ideally we should get all events in the buffer and then

  1. Prioritize small events that just change parameters (InputEvent::MouseMove and so on) and afterward execute a potential RequestRedraw event
  2. Merge multiple events, when we have multiple
    • MouseMove events, we should drop all events except the last.
    • MouseScroll events, we should collect up all of them and add up the deltas
    • RequestRedraw events, we should only redraw once

This should improve the general responsiveness of the engine because when you use your mouse and the engine can't keep up it will try to always stay most up to date rather than rendering all frames in between the last render and now.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    📝 Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0