libretro / libretro/parallel-n64

Feature Request: Snapping Control Stick Angle

Open
#792 4 comments 0 reactions 0 assignees View on GitHub

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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.