Skip to content

Feature/11167: Revamped input handling + better road detection#11168

Open
BramTeurlings wants to merge 4 commits into
Card-Forge:masterfrom
BramTeurlings:feature/archipelago/revamped-input-system
Open

Feature/11167: Revamped input handling + better road detection#11168
BramTeurlings wants to merge 4 commits into
Card-Forge:masterfrom
BramTeurlings:feature/archipelago/revamped-input-system

Conversation

@BramTeurlings

@BramTeurlings BramTeurlings commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Split off from: Archipelago PR

Overhauled input system

  • The base-game's input system currently suffers from multiple input methods fighting for control. One particular issue that prompted me to overhaul it was the angle the player walks in when inputting a diagonal direction on keyboard. It's not 45 degrees like you would expect, it's actually close to 22.5 degrees because one of the input methods correctly reads 45 degrees but the logic is executed a second time on one of the pressed keys (not both) resulting in a combined angle of 22.5 degrees. Further issues include one of the pressed keys being ignored until re-pressed if pressed too quickly in conjunction with other movement keys.
  • The new input system defines a clear priority between keyboard/mouse (or touch)/controller inputs so they no longer fight for control.
  • The new input system stores each of its directions/vectors in a separate value so no unintentional overlapping of directions occur
  • Fixed a crash where the console would attempt to fetch a String for a list on an index which doesn't exist. Very easy to trigger after making a new game, just open the console and press arrow down and arrow up.
image - Made the console clear the text field when pressing the down arrow without a more recent command in the console's history. This more closely mimics what Linux/Windows terminals do.

Better road detection

  • forge-gui-mobile/src/forge/adventure/stage/WorldStage.java#L269 > This shifts the detection point for which biome the player is walking on to the centre of the sprite instead of the left-most pixel. The vertical axis remains unchanged at the bottom.

Everything works for the player animations are jittery on controller now.
haven't tested mobile either but mouse works.
Still not tested on mobile but will do later. (Should be the same as mouse input)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Adventure For the Adventure Module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants