daid / daid/EmptyEpsilon

[Enhancement] Improve joystick support

Open
#2,416 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
869
Forks
222
Avg merge
18h 33m
Merged PRs (30d)
1

Description

While working on #2412, I realised that joystick support needs quite some work.

  • Global parameters for deadzone and max_deadzone should be used for all joystick inputs. (Perhaps adding some settings in the menu also)
  • A resolution parameter should also be used to avoid too many networking calls. (the difference between current input and last input needs to be a minimum size before network call)
  • I fixed some code in that PR that lead to the joystick input of 2 where joystick should have a maximum of 1. I suspect that pattern is replicated in other places.

Ideally we want to handle the deadzones and resolution for each different joystick in the event handler directly so we don't have the same snippet of code repeated in many places in the codebase.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the joystick handling shown in src/screens/crew6/helmsScreen.cpp around the linked code, then trace the event handler and other joystick input paths. Compare how deadzones, maximum deadzones, resolutions, and network calls are handled; done means establishing a consistent approach across the identified inputs and verifying that joystick values stay within the intended range.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.