Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/mechanics/track.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ What public sources describe:

What OpenCoaster does (our own design inspired by the above; **[I]**):
- A ride's track is one or more open sections or a single closed ring. Any piece can be demolished; removing a middle piece splits its section, or opens a closed circuit at that point. A placement may continue any section's last piece and lead into any section's first piece, joining sections. The ride only counts as a complete circuit when all of its track forms one ring with a station.
- The construction window keeps a selected piece (editor state only, never saved). Previous piece / Next piece step along the track, clicking rails in the build tool selects that piece, and the ride window offers Edit from this piece when it was opened from a rail. Build piece continues from the selection's open end; Build before this piece extends a section backward from its first piece. Demolish removes the selected piece, and the selection moves to its neighbour, preferring the previous one.
- The construction window keeps a selected piece (editor state only, never saved). Previous piece / Next piece step along the track, clicking rails in the build tool selects that piece, and the ride window offers Edit from this piece when it was opened from a rail. Build piece continues from the selection's open end; Build before this piece extends a section backward from its first piece. Demolish removes the selected piece, and the selection moves to its neighbour, preferring the previous one. Selecting a piece pans the camera only when windows or the screen edge hide it.
- Track can only change on a ride that is closed with its trains home and empty: not while open or testing, while a train is loading, running or unloading, or while riders are aboard. The edit is refused rather than force-closing the ride.
- After a demolition, an entrance or exit with no station tile beside it any more is detached from the ride; the ride needs a new one before it can open.
- Difference from the original: removing a piece gives no per-piece refund. Demolishing the whole ride refunds the pieces that remain.
Expand Down
2 changes: 1 addition & 1 deletion e2e/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Path: @/e2e
- [observation-tower-height.spec.ts](observation-tower-height.spec.ts) builds towers of chosen height through the placement controls (helpers in [support/tower.ts](support/tower.ts)), checks section prices, edits a closed tower's height from its window, and samples a test run for one climb, one descent and a steady cabin speed. [observation-tower-proof.spec.ts](observation-tower-proof.spec.ts) runs only when `TOWER_PROOF_DIR` is set and writes the PR proof (screenshots in every rotation for WebGL2 and Canvas2D, a phone check, a 1x video, timing JSON).
- [flat-ride-footprints.spec.ts](flat-ride-footprints.spec.ts) builds all ride types through the UI on a flat street site and checks the placement ghost, allowed entrance ring, entrance and exit placement, open state, and footprint visibility in all four camera rotations. Swinging Ship, Ferris Wheel and Top Spin also exercise every ride orientation. Only the Merry-Go-Round waits for guests to ride and captures the served state; this keeps the full footprint matrix while avoiding repeated long guest simulations. Forced Canvas2D checks representative 3x3 square (Twist), elongated (Swinging Ship), and single-tile/tall-art (Observation Tower) footprints. The spec settles screenshots and guest-serving checks with simulation-tick polling and rendered-state assertions instead of fixed delays. A Pixel 8 case checks the Rotate ride button clears the HUD. Set `FOOTPRINT_SHOTS_DIR` to write the JPEG sheets (committed under docs/playtest/assets/footprints) instead of the test output folder.
- [track-heights.spec.ts](track-heights.spec.ts) imports a flat owned park and, through the construction window only, builds a Steel Looping Coaster whose station end and far side sit one land level apart, checking the `Track end at height N` line through each half-level step of the climb and descent, and closes the circuit. Set `TRACK_HEIGHTS_PROOF_DIR` to write screenshots of the circuit in each rotation.
- [track-edit-selection.spec.ts](track-edit-selection.spec.ts) runs on desktop and emulated Pixel 8 under both WebGL2 and Canvas2D, importing a save from [support/track-edit-park.ts](support/track-edit-park.ts) (a closed tested circuit, plus an unfinished coaster crossed by another ride's overpass). It opens a ride window from a clicked rail and uses Edit from this piece, steps with Previous/Next piece, demolishes a middle piece and rebuilds it to close, test and reopen the circuit, checks an open ride refuses edits, selects stacked rails of two rides by click or tap, builds before a section's first piece, returns to Track end, and checks the selection outline sits over the clicked piece.
- [track-edit-selection.spec.ts](track-edit-selection.spec.ts) runs on desktop and emulated Pixel 8 under both WebGL2 and Canvas2D (plus a Pixel 8 landscape, 915x412 touch, variant of the closed-circuit flow), importing a save from [support/track-edit-park.ts](support/track-edit-park.ts) (a closed tested circuit, plus an unfinished coaster crossed by another ride's overpass). It opens a ride window from a clicked rail and uses Edit from this piece, steps with Previous/Next piece, demolishes a middle piece and rebuilds it to close, test and reopen the circuit, checks an open ride refuses edits, selects stacked rails of two rides by click or tap, builds before a section's first piece, returns to Track end, and checks the selection outline sits over the clicked piece. `expectPieceUncovered` requires at least 99% of the selected piece's rail pixels to hit the canvas rather than a sheet or bar, with the outline matching the piece's bounds. Phones also check Previous/Next/Demolish/Build sit in the viewport without scrolling; desktop checks Edit from this piece leaves the camera still; a manual pan survives running the game until the next selection reveals the piece again. `ridePieces` reads the snapshot in one evaluation to avoid detached buffers.
- [art-review.spec.ts](art-review.spec.ts) compares default-zoom facility renders against the same scene without the facility, requiring a minimum visible-pixel area in both backends, and captures a populated context scene in all rotations. It also builds completed coaster and transport rides through the simulation's `createCoaster` and `placeTrack` command path, then renders their snapshots with the production Canvas2D and WebGL2 renderers. It verifies that each placed track piece resolves to generated art with opaque pixels and that the rendered canvas has no red fallback marker; optional capture output includes inventory sheets and per-ride images. The fixture imports [sprite-pages.ts](../src/render/sprite-pages.ts) by its canonical module URL so lazy page loads are visible to the renderer's shared sprite store.
- [p1-ui-fidelity.spec.ts](p1-ui-fidelity.spec.ts) requires the desktop canvas to use WebGL2, checks populated ride windows avoid status bar and pointer overlap, validates compact coaster controls, builds while paused, checks the 2× construction cap and ride preview, verifies saved desktop window placement, and exercises ownership UI. The ride-access Pixel 8 scenario checks the construction controls fit the mobile viewport and uses touch to build.
- [ride-breakdown-proof.spec.ts](ride-breakdown-proof.spec.ts) captures both a forced breakdown with a mechanic en route and a separate naturally rolled breakdown. The natural seeded scene in [support/breakdown-scene.ts](support/breakdown-scene.ts) advances until reliability has fallen and rolling downtime is nonzero; its Maintenance screenshot documents those live values.
Expand Down
Loading
Loading