fwcd / fwcd/lidoom

Apply some smoothing to the SDL mouse events

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Currently, the game's mouse controls feel a bit stuttery when used from the GUI (the LUNA-based input works fine), likely because SDL provides us with a much higher frequency of mouse events, which would trigger the deadzone more often. One way to avoid this would e.g. be to apply a moving average or simply to throttle the mouse events to a lower frequency. We'd have to be a bit careful in the computation of relative positions, especially when the pointer is locked, since SDL's `xrel` and `yrel` seem to refer to the delta between individual events, we'd have to keep track of all such changes even if we decide not to emit `ControllerMessage`s for each.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the SDL mouse-event handling and trace how xrel and yrel become ControllerMessages, including the pointer-locked path. Compare moving-average and throttling behavior, preserving all relative movement when events are not emitted. Done means GUI mouse controls no longer stutter while accumulated relative positions remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.