Ralith / Ralith/hypermine

Add an input-management layer

Open
#403 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
202
Forks
22
Avg merge
6h 8m
Merged PRs (30d)
7

Description

Currently, keyboard and mouse input is all handled in an ad-hoc manner in window.rs. Adding an extra layer of abstraction could help simplify the process of adding a new control. We could solve the following problems in one central place (although we don't need to solve them all now to resolve this issue):

  • Allowing rebinding of controls
  • Adding contextual controls
  • Having input presses that trigger an event on the next tick
  • Having an axis control for movement
  • Detecting conflicts (and allowing the same key to do multiple things if unambiguous enough)
  • etc. (This list is not exhaustive.)

Ideally, after this issue is done, if somebody wants to add a new key that does something, they'll just need to add the logic with minimal boilerplate code.

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 by reading window.rs and inventorying how keyboard and mouse input are currently handled. Narrow the broad list of possible goals to a defined first increment, then verify that adding a new control requires minimal boilerplate and that the chosen behavior is covered by the project’s existing checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.