Skip to content

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

Merged
kevlahnota merged 5 commits into
Card-Forge:masterfrom
BramTeurlings:feature/archipelago/revamped-input-system
Aug 12, 2026
Merged

Feature/11167: Revamped input handling + better road detection#11168
kevlahnota merged 5 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)
Comment thread forge-gui-mobile/src/forge/adventure/stage/GameStage.java Outdated
Added helper function to KeyBinding.java for getting pressed key from libGDX
@kevlahnota
kevlahnota merged commit 46e8532 into Card-Forge:master Aug 12, 2026
3 checks passed
@tehdiplomat

Copy link
Copy Markdown
Contributor

Reverting just in case this broke android builds.

@tehdiplomat

Copy link
Copy Markdown
Contributor

@BramTeurlings FYI, this broke adventure mode on Android devices from being able to enter towns or start battles.

@BramTeurlings

Copy link
Copy Markdown
Contributor Author

Ah, I've seen this bug and fixed it on Windows but I wasn't yet able to figure out how to build for Android. I'll see if I can figure that out and re-open a PR with a fix. Sorry for the inconvenience.
Does anyone happen to know what the easiest way is to build Android locally btw?

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.

5 participants