Skip to content

Replace fixed mobile joystick with Stampede-style drag control#102

Merged
DaniloNovakovic merged 4 commits into
mainfrom
feat/portrait-cover-drag-touch
Jun 8, 2026
Merged

Replace fixed mobile joystick with Stampede-style drag control#102
DaniloNovakovic merged 4 commits into
mainfrom
feat/portrait-cover-drag-touch

Conversation

@DaniloNovakovic

Copy link
Copy Markdown
Owner

Summary

  • Replaces the always-visible corner joystick and Jump/Interact buttons on portrait-cover scenes with Stampede-style Portrait-Cover Touch Control: drag anywhere for horizontal analog movement, tap to interact, drag indicator only while touching.
  • Applies to overworld, hobbies, basement, and Ridge on mobile; jump remains desktop-only.
  • Updates overworld mobile hint copy, player manual, and adds a Portrait-Cover Touch Control glossary term in CONTEXT.md.

Test plan

  • On mobile/narrow viewport, open overworld — playfield is clear until you drag
  • Drag left/right — character moves with analog speed; small stick appears under finger and disappears on release
  • Tap without dragging — interact prompt fires when near a building/trigger
  • Enter hobbies, basement, and Ridge — same drag/tap behavior, no permanent buttons
  • Desktop controls unchanged (keyboard move + up-arrow jump)
  • npm test -- --run src/game/shell/portraitCoverTouchInput.test.ts src/game/shell/InteractiveApp.test.tsx

Made with Cursor

Portrait-cover scenes now use horizontal analog drag with an ephemeral
indicator at the touch anchor, tap-to-interact, and no on-screen buttons.

Co-authored-by: Cursor <cursoragent@cursor.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the previous mobile touch controls (on-screen joystick, jump, and interact buttons) with a new 'Portrait-Cover Touch Control' system. Players can now drag anywhere on the game area for horizontal analog movement (with an ephemeral drag indicator) and tap to interact, while jump remains desktop-only. Feedback focuses on optimizing performance by caching container coordinates on pointerdown to avoid calling getBoundingClientRect() on every pointermove event, as well as improving pointer handling to prevent multi-touch hijacking and accidental tap interactions during vertical drags.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/game/shell/useGameTouchControls.ts Outdated
Comment thread src/game/shell/useGameTouchControls.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ba980e428

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/game/shell/useGameTouchControls.ts Outdated
DaniloNovakovic and others added 3 commits June 8, 2026 07:36
Extract reduceControlMatDragIndicator for portrait-cover and control-mat
hooks, flatten touch handler return, unexport internal constants, and
remove orphaned useTouchGestures.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cache drag anchor on pointer down, ignore secondary touches, and treat
vertical travel as drag so release does not accidentally tap interact.

Co-authored-by: Cursor <cursoragent@cursor.com>
Satisfies react-refresh/only-export-components by colocating
reduceControlMatDragIndicator in controlMatDragIndicatorState.ts.

Co-authored-by: Cursor <cursoragent@cursor.com>
@DaniloNovakovic DaniloNovakovic merged commit 85811e0 into main Jun 8, 2026
1 check passed
@DaniloNovakovic DaniloNovakovic deleted the feat/portrait-cover-drag-touch branch June 8, 2026 05:44
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.

1 participant