# Phase 7.2 Revised Next-Step Proposal: Hi Fi Snake — build019

## Cycle Objective

Resolve the remaining control-accessibility and usability problems without reopening issues that have already been addressed.

Phase 7.2 should focus on:

1. Correct tablet and mobile control detection.
2. Making pellet collection less punishing.
3. Improving grid turning only if collision adjustments are insufficient.
4. Making the virtual joystick more forgiving.
5. Providing clear feedback for locked skins.

The existing active-input movement model should remain in place. Auto-walk has produced worse session times across all tests and should not receive further testing during this cycle.

---

## Completed or Removed from Scope

The following items are already resolved and should not remain in the Phase 7.2 task list:

* WebGL black-screen rendering failures
* Desktop control hint
* Auto-walk versus active-input testing

### Movement Decision

Retain `ActiveInputPlayerMovementService`.

Auto-walk has consistently produced worse session times and should be treated as a rejected direction unless future evidence provides a strong reason to revisit it.

---

## Urgent

### 1. Correct Tablet and Mobile Input Resolution

Fix the device-resolution logic in:

* `JoystickControls`
* `IcoBitZipDevice.jslib`
* Any Playgama device-resolution integration
* Browser fallback checks

Modern tablets may request desktop versions of websites or expose desktop-like browser identifiers. Device classification should therefore not rely entirely on user-agent or screen-resolution assumptions.

Detection should consider available touch and pointer capabilities where possible.

#### Acceptance Criteria

* Tablets consistently display the virtual joystick.
* Mobile devices are not shown desktop-only controls.
* Desktop devices without touch continue to use keyboard controls.
* Previously affected tablet configurations can begin playing immediately.
* Desktop-site mode on a tablet does not disable touch controls.

---

### 2. Increase Pellet Collision Bounds

Test a small increase to the physical trigger size of collectible pellets before changing the movement or input-buffering system.

This is the lowest-risk intervention and may resolve a significant portion of the reported frustration without altering the core control model.

Use incremental adjustments rather than a large increase.

#### Test Order

1. Record the current pellet trigger dimensions.
2. Create a small increase.
3. Test common near-miss approaches.
4. Confirm that pellets cannot be collected from adjacent lanes.
5. Compare Room 1 behavior with the existing build.

#### Acceptance Criteria

* Players can collect pellets during visually reasonable passes.
* Minor grid misalignment does not repeatedly prevent collection.
* Pellets cannot be collected from an adjacent lane.
* Collection still appears visually believable.
* The increase does not cause unintended multiple-pellet collection.

---

## Next

### 3. Refine Grid Turning and Input Buffering

Only proceed with deeper movement changes if increasing the pellet collision bounds does not sufficiently reduce control frustration.

Investigate:

* Grid alignment tolerance
* Timing of perpendicular turns
* Joystick release during a partially completed grid movement
* Buffered directional input
* Invalid reverse-direction requests

The first movement change should be the smallest intervention capable of resolving the remaining issue.

#### Recommended Implementation Order

1. Slightly widen the valid grid-turn window.
2. Test whether this resolves missed turns.
3. Add a single buffered next-direction input only if needed.
4. Review joystick-release behavior if buffered turns are still being cancelled.
5. Keep reversal behavior explicit and consistent.

#### Reverse-Direction Rule

A rapid 180-degree reversal should not appear to be ignored because of a control failure.

If reversals are prohibited by the game rules:

* Reject the input consistently.
* Preserve the current valid movement direction.
* Consider providing subtle feedback when the input is invalid.

#### Acceptance Criteria

* Valid perpendicular turns execute predictably.
* Players do not need to hit an extremely narrow grid-alignment window.
* A buffered turn executes at the next valid opportunity.
* Releasing the joystick does not unintentionally erase a valid queued turn.
* Invalid reversal attempts do not interrupt valid movement.
* Changes do not introduce wall clipping or unintended lane switching.

---

### 4. Expand the Virtual Joystick Interaction Area

Increase the active touch bounds beyond the visual joystick boundary.

A touch that begins on the joystick should continue controlling movement when the player drags slightly outside the artwork.

Consider two related improvements:

* Larger initial touch-acquisition area
* Continued drag tracking outside the visible joystick bounds

#### Acceptance Criteria

* Slightly inaccurate initial touches still activate the joystick.
* Dragging outside the visual boundary does not immediately cancel input.
* Input stops correctly when the touch ends.
* The expanded area does not block nearby interface elements.
* Multi-touch interactions remain predictable.

---

### 5. Add Locked-Skin Feedback

Players should receive immediate feedback when they select a skin that they cannot purchase or equip.

The response should communicate:

* That the skin is locked
* Its unlock condition or price
* The player's current currency when relevant
* Why the attempted action did not succeed

Possible feedback includes:

* A short message
* Currency or lock animation
* Button-state change
* Error sound
* Highlighting the missing requirement

#### Acceptance Criteria

* Every locked skin provides feedback when selected.
* Insufficient currency is clearly communicated.
* Purchased, equipped, selected, and locked states are visually distinct.
* Currency is only deducted after a successful purchase.
* Repeated taps do not create duplicate transactions or conflicting states.

---

## Recommended Build Order

### Build 7.2A — Device Access

* Fix tablet and mobile device detection.
* Test previously affected tablet configurations.
* Confirm desktop behavior remains unchanged.

### Build 7.2B — Low-Risk Control Assistance

* Increase pellet collision bounds.
* Expand virtual joystick interaction bounds.
* Add locked-skin feedback.

### Build 7.2C — Movement Refinement

Only create this build if control issues remain after Build 7.2B.

* Adjust grid-turn tolerance.
* Add directional input buffering if necessary.
* Refine joystick-release behavior.
* Confirm reverse-direction handling.

---

## Deferred Work

Do not include the following in Phase 7.2:

* Daily three-room remix systems
* Advanced upgrade synergies
* Additional skins or trails
* Shop inventory expansion
* Tighter corridors
* More complicated hazards
* Major room-layout complexity
* Broad economy rebalancing
* Further auto-walk testing

These features should remain deferred until tablet access, pellet collection, joystick usability, and turning reliability have been validated.

---

## Systems to Preserve

### Active-Input Movement

Retain the active-input control model. It has outperformed auto-walk in session-time testing.

### Room-Based Progression

Keep the short, self-contained room structure supporting the intended two-to-five-minute play sessions.

### Speed Progression

Retain the current speed progression:

* Starting speed: `4`
* Increase per room: `0.4`

Do not change speed progression during the pellet-collision or turning tests. Keeping it stable will make test results easier to interpret.

---

## Measurement and Poki Analytics

Custom telemetry may not be practical or available in the current Poki integration.

Before defining new analytics requirements, verify which metrics and custom events Poki currently supports.

At minimum, use any available Poki data to review:

* Session duration
* Early exits
* Device category
* Platform or browser breakdown
* Gameplay start rate
* Return rate, if available

Where analytics cannot measure specific control failures, rely on structured playtest observation.

### Playtest Observation Checklist

Record whether the player:

* Receives the correct control method
* Starts moving without assistance
* Misses a pellet during a visually valid pass
* Circles around a pellet
* Attempts a turn that does not execute
* Drags outside the joystick boundary
* Taps a locked skin and understands the result
* Completes Room 1
* Exits during Room 1

Do not make custom telemetry a release requirement until Poki capabilities have been confirmed.

---

## Test Hypotheses

### Hypothesis 1 — Tablet Accessibility

Correctly displaying touch controls on tablets will substantially reduce immediate abandonment among affected tablet players.

### Hypothesis 2 — Pellet Forgiveness

A small increase in pellet collision bounds will reduce repeated approaches and circling behavior without requiring major movement changes.

### Hypothesis 3 — Joystick Reliability

Expanding the joystick interaction area will reduce accidental control loss caused by imprecise dragging.

### Hypothesis 4 — Turning

If collision adjustments are insufficient, a wider turn window or single buffered input will improve turning reliability without weakening the core Snake challenge.

### Hypothesis 5 — Shop Feedback

Clear locked-skin feedback will prevent players from interpreting unavailable purchases as broken UI.

---

## Phase 7.2 Exit Criteria

Phase 7.2 is complete when:

* Previously affected tablets consistently receive touch controls.
* Players can collect pellets without excessive alignment correction.
* The joystick remains active during normal imprecise dragging.
* Locked skins clearly explain why they cannot be selected or purchased.
* Room 1 can be completed without recurring control-related confusion.
* Any remaining turning problems have either been resolved or clearly isolated.
* No major regression appears in desktop controls, movement difficulty, or shop transactions.

---

## Suggested Version Note

“Control and usability update improving tablet detection, pellet collection, virtual joystick reliability, grid turning, and locked-skin feedback.”

---

## What to Watch Next

* Whether tablet players receive the joystick immediately
* Whether a larger pellet trigger resolves circling behavior
* Whether joystick dragging remains active outside the visual bounds
* Whether players still miss valid perpendicular turns
* Whether locked-skin interactions are understood
* Whether Room 1 completion and session duration improve