Skip to content

Touch support - #3016

Merged
manuq merged 16 commits into
mainfrom
touch-support
Oct 15, 2026
Merged

manuq merged 16 commits into
mainfrom
touch-support

Conversation

@manuq

@manuq manuq commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Add on-screen touch controls to the HUD, shown only on touchscreens:

  • A VirtualJoystick node anchored to the bottom-left corner to walk and run.
  • Interact and repel buttons anchored to the bottom-right corner.
  • A pause button anchored to the top-left corner, opposite to the threads in the HUD.
  • Tap anywhere else to aim the grappling hook, drag to keep aiming, and lift the finger to throw.

Decisions made to simplify the controls:

  • There is no separate touch button for running. Pushing the virtual joystick all the way, make the player character run.
  • Repel is hidden while interact is available. This makes it not possible to repel when an interation is possible (like next to an NPC that talks). I haven't found any issues with this during a playthrough.

The controls hide during transitions, pauses and dialogue. Reset the
joystick when they hide, so the player doesn't keep walking.

I did the icons for the touch buttons myself using GIMP, they can be assumed as placeholders. I made them semitransparent, and quickly by using emojis from my system sans-serif font:

  • Repel: "radio button" 🔘 U+1F518
  • Pause: "double vertical bar" ⏸ U+23F8
  • Interact: "left speech bubble" 🗨️ U+1F5E8

Other changes:

  • Hide the input hints HUD on touchscreens.
  • Remove the touchscreen warning from the title screen.
  • Allow skipping the splash screen with a tap.
  • Make the mouse buttons for throw and repel only respond to a real
    mouse. Godot also turns touches into mouse clicks, so touching the
    joystick was throwing the hook. Hook aiming and the mouse cursor
    ignore those emulated clicks and motion too.
  • Fix the fullscreen setting being out of sync on the web. For
    example when leaving fullscreen from the browser, or now that the
    game starts in fullscreen.
  • Don't warn in the console when a desktop browser can't lock the
    screen orientation.

Resolve #806

@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/touch-support/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@manuq
manuq marked this pull request as ready for review October 15, 2026 14:16
@manuq
manuq requested a review from a team as a code owner October 15, 2026 14:16
@manuq
manuq merged commit b66dc26 into main Oct 15, 2026
7 checks passed
@manuq
manuq deleted the touch-support branch October 15, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add touch input controller

1 participant