Add rideable bicycles at mapped bike parking #54

Merged
sermuns merged 1 commit from feat/bicycles into main 2026-10-19 19:26:54 +00:00
Owner

Bicycles become a second VehicleKind and spawn at every mapped bicycle-parking spot.

#40 — bicycles as a vehicle

  • VehicleKind::{ElectricScooter, Bicycle}: the bicycle is slower (25 vs 40), turns a bit tighter, has no drift, and rides with a lower eye height.
  • Wire protocol: ScooterPose → VehiclePose with a kind byte; ScooterInput → VehicleControl; ServerMsg::Scooters → Vehicles; mounted_scooter → mounted_vehicle. Breaking wire change — cached browser tabs must reload.
  • Renderer draws bicycles (red) from their own mesh buffers, separate from scooters (yellow): two wheels, frame tubes, fork and a steered handlebar.

#31 — bikes at the parking

  • PROP_PARKING → PROP_BIKE_PARKING; the bake emits it for amenity=bicycle_parking nodes and now also at the centroid of each bicycle-parking way. It previously lumped car and bike parking into one prop and ignored ways.
  • spawn_bicycles stands one bicycle at each mapped spot, with a position-hashed yaw so a rebake does not reshuffle the lot.
  • Rebaked assets/baked/valla.bin: the only change is props 578 → 635 (the parking ways); everything else is byte-for-byte the same campus. Bike-parking props total 112 (55 nodes + 57 ways), so the fleet is up to 80 scooters + 112 bicycles; MAX_VEHICLES raised to 256.

Docs (ARCHITECTURE.md, README.md) and the HUD help line are updated.

Verification

just check passes: fmt, clippy --workspace --all-targets -- -D warnings, cargo test --workspace, cargo deny check advisories bans sources.

Closes #40
Closes #31

Bicycles become a second `VehicleKind` and spawn at every mapped bicycle-parking spot. ## #40 — bicycles as a vehicle - `VehicleKind::{ElectricScooter, Bicycle}`: the bicycle is slower (25 vs 40), turns a bit tighter, has no drift, and rides with a lower eye height. - Wire protocol: `ScooterPose` → `VehiclePose` with a `kind` byte; `ScooterInput` → `VehicleControl`; `ServerMsg::Scooters` → `Vehicles`; `mounted_scooter` → `mounted_vehicle`. **Breaking wire change** — cached browser tabs must reload. - Renderer draws bicycles (red) from their own mesh buffers, separate from scooters (yellow): two wheels, frame tubes, fork and a steered handlebar. ## #31 — bikes at the parking - `PROP_PARKING` → `PROP_BIKE_PARKING`; the bake emits it for `amenity=bicycle_parking` nodes and now also at the centroid of each bicycle-parking way. It previously lumped car and bike parking into one prop and ignored ways. - `spawn_bicycles` stands one bicycle at each mapped spot, with a position-hashed yaw so a rebake does not reshuffle the lot. - Rebaked `assets/baked/valla.bin`: the only change is `props 578 → 635` (the parking ways); everything else is byte-for-byte the same campus. Bike-parking props total 112 (55 nodes + 57 ways), so the fleet is up to 80 scooters + 112 bicycles; `MAX_VEHICLES` raised to 256. Docs (`ARCHITECTURE.md`, `README.md`) and the HUD help line are updated. ## Verification `just check` passes: fmt, `clippy --workspace --all-targets -- -D warnings`, `cargo test --workspace`, `cargo deny check advisories bans sources`. Closes #40 Closes #31
Scooters are no longer the only VehicleKind: a bicycle is slower, turns
tighter, has no drift and rides with a lower eye height, and one stands
beside every bicycle-parking rack. The bake now emits
PROP_BIKE_PARKING for amenity=bicycle_parking nodes and for the
centroid of each parking way (previously one undifferentiated
PROP_PARKING), so the fleet gains a bicycle per spot.

The wire protocol carries the kind on VehiclePose, so online riders see
and ride both. Breaking wire change: reload cached browser tabs.

Closes #40
Closes #31
sermuns force-pushed feat/bicycles from 6c1238dd08 to 4c3a8c9dd5 2026-10-19 18:32:32 +00:00 Compare
sermuns force-pushed feat/bicycles from 4c3a8c9dd5 to 0809f3be6f 2026-10-19 19:24:23 +00:00 Compare
Sign in to join this conversation.
No description provided.