Skip to content

Mobile Support: Responsive UI & Touch Controls - #2

Merged
venice-dev[bot] merged 1 commit into
soli-testbench:mainfrom
saucegodbased:venice-task-eacf3bb8
Mar 28, 2026
Merged

Mobile Support: Responsive UI & Touch Controls#2
venice-dev[bot] merged 1 commit into
soli-testbench:mainfrom
saucegodbased:venice-task-eacf3bb8

Conversation

@saucegodbased

Copy link
Copy Markdown

Mobile Support: Responsive UI & Touch Controls

Makes the game fully playable on mobile devices with two key changes:

1. Responsive Start/Game-Over Screen

  • Added CSS media query (max-width: 768px) that expands the overlay box to fill the entire screen on mobile viewports
  • Removes border-radius and adjusts padding for a clean full-screen experience
  • Scales down title and text sizes for smaller screens

2. Touch-Based Game Controls

  • Removed pointerType === "mouse" filters from onPointerMove and onPointerLeave to support all pointer types
  • Touch down: Activates player tracking and updates position (starts/resumes game)
  • Touch move: Updates mouseX/mouseY so player follows finger position
  • Touch up: Deactivates tracking (pauses game, mirroring desktop mouse-leave behavior)
  • Added touch-action: none CSS to prevent default browser touch behaviors (scrolling, zooming)
  • Desktop mouse controls remain completely unchanged

Acceptance Criteria Met

  • Mobile overlays fill entire screen on viewports ≤ 768px
  • Touching screen starts game; player follows finger via touch-move
  • Lifting finger pauses/stops game (analogous to mouse leaving window)
  • Desktop mouse controls unchanged — no regressions
  • Root-level Dockerfile exposes app on port 8080

- Add CSS media query (max-width: 768px) for full-screen overlays on mobile
- Remove pointerType === 'mouse' filter from onPointerMove to support touch
- Remove pointerType === 'mouse' filter from onPointerLeave for all pointer types
- Add touch-specific logic: pointerdown activates tracking, pointerup pauses game
- Add touch-action: none to prevent default browser touch behaviors
- Desktop mouse controls remain unchanged

Co-Authored-By: bot_apk <apk@cognition.ai>
@venice-dev
venice-dev Bot merged commit 2c5718c into soli-testbench:main Mar 28, 2026
1 check passed
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