jasonlooked #1

Merged
eros merged 21 commits from jasonlooked into main 2026-07-11 10:13:09 -07:00
Showing only changes of commit dc62c4f55f - Show all commits

View File

@ -21,22 +21,24 @@ A 1v1 async multiplayer 2D curling game for mobile browser.
npm run dev npm run dev
# opens on 0.0.0.0:5173 by default # opens on 0.0.0.0:5173 by default
``` ```
4. Open two browser tabs to the same room URL, e.g.: 4. Open one or more browser tabs to the same room URL, e.g.:
``` ```
http://localhost:5173/?room=DEMO1 http://localhost:5173/?room=DEMO1
``` ```
The first tab waits; the second starts the match. Use the *Copy share link* button to invite an opponent. Use the team dropdown in the top-right to switch between Red and Yellow — this enables local pass-and-play on one device. Use the *Copy share link* button to invite an opponent on another device.
### Mobile devices ### Mobile devices
The frontend binds to `0.0.0.0` via `--host`. Find your machine's LAN IP and open `http://<ip>:5173/?room=CODE` on the phone. Both devices must be on the same Wi-Fi and able to reach the backend on port `3000`. The frontend binds to `0.0.0.0` via `--host`. Find your machine's LAN IP and open `http://<ip>:5173/?room=CODE` on the phone. Both devices must be on the same Wi-Fi and able to reach the backend on port `3000`. The default view is zoomed in on the house; drag the sheet vertically to scroll up to the hog line.
### Controls ### Controls
- Drag inside the house to place the broom (aim point). - Drag inside the house to place the broom (aim point).
- Tap a weight `1``10`. - Use the team dropdown to choose which team's stone you are throwing.
- Use the left/right arrow buttons to select curl; the arrow points the direction the stone will curve.
- Tap **THROW**. - Tap **THROW**.
- The server runs the physics and streams the trajectory; the frontend interpolates the animation. - The server runs the physics for every stone and streams their paths; the frontend interpolates the animation, so collisions animate smoothly for all stones.
- Drag anywhere outside the house (or when it's not your turn) to scroll up toward the hog line.
### Architecture ### Architecture
@ -54,6 +56,7 @@ cd e2e
npm install -g ws # or npm install ws locally in the project npm install -g ws # or npm install ws locally in the project
node e2e_test.cjs # room lifecycle, throw, trajectory, out-of-play removal node e2e_test.cjs # room lifecycle, throw, trajectory, out-of-play removal
node e2e_score.cjs # stones remain in play and alternate turns node e2e_score.cjs # stones remain in play and alternate turns
node collision_trajectory_qa.cjs # verifies every stone gets a trajectory during a collision
``` ```
### Limitations / known simplifications ### Limitations / known simplifications