libretro / libretro/parallel-n64
Feature Request: Snapping Control Stick Angle
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 407
- Forks
- 151
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 11
Description
Hello,
What
Many emulators have a setting to snap the control stick to cardinal directions to simulate a control stick like on the N64 or GameCube controller.
Usually this includes a setting, which offsets to snap to the nearest cardinal direction.
For example the setting is set to "5", angles from 85 to 95 would snap to 90.
Why
- Closer emulation of classic controller behaviour
- Speedrunning and such
- Better support for circular controllers
If you would point me to the place in the code where the input angle is read I can give it a shot, I haven't worked with C/C++ in 15 years though, so I can't promise anything.
Edit: Am I correct to assume that this would be the correct place to start: Permalink
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at mupen64plus-core/src/plugin/emulate_game_controller_via_libretro.c around line 317, the location identified for reading input angles. Trace how the stick angle is handled and determine where a configurable cardinal-direction snap offset belongs. Done means the requested snapping behavior and setting are implemented for the described controller angles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100