feat(pocket3d): pocket-drive — streamed open-data city drive on PSP#132
Draft
doodlewind wants to merge 1 commit into
Draft
feat(pocket3d): pocket-drive — streamed open-data city drive on PSP#132doodlewind wants to merge 1 commit into
doodlewind wants to merge 1 commit into
Conversation
A new pocket3d runtime demo: Midtown Manhattan (OpenStreetMap buildings + streets, 94% surveyed heights) cooked into a tiled .pdrv mesh pack and streamed off the memory stick around a car following a baked scenic route — the Tesla-dash night-drive look on real PSP hardware. - cooker/cook.ts (Bun, zero deps): Overpass fetch → pinned extract → ear-clipped, extruded, vertex-lit tiles in the 12-byte GE vertex layout; Dijkstra waypoint route (Flatiron → Empire State → Herald Sq loop); byte-deterministic; SVG preview. - src/: zero-copy .pdrv reader, async sceIo tile streamer (residency ring, ahead-bias, rise-from-ground animation), zero-triangle infinite-ground backdrop, GE fog, route ribbon, box-art cars with corner slowdown, orbit→chase camera, gu-demo capture contract; embedded-pack fallback. - scripts/pocket-drive.ts: cook + cargo psp + PPSSPPHeadless + PNGs. Verified in PPSSPPHeadless (software renderer): intro rise, avenue drive, 90-degree turns, oncoming traffic, both pack sources; ~35 tiles / ~10k tris per frame. Real-hardware pass pending, same bar as gu-demo. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new pocket3d runtime demo, Pocket Drive: a Tesla-dash-style night drive through Midtown Manhattan on PSP. Open data (OpenStreetMap buildings + streets — 4,390 footprints, 94% with surveyed heights, 822 streets around the Flatiron / Empire State corridor) is cooked into simple extruded meshes in a tiled binary pack, then streamed tile-by-tile off the memory stick around a car that follows a baked scenic route. New blocks rise from the ground as they load — the dynamic loading is the show.
How
cooker/cook.ts(Bun, zero deps): Overpass fetch → pinned 220 KB extract (offline, byte-deterministic cooks) → ear-clipped footprints extruded by surveyed height with baked vertex lighting (facing shade + base AO + roof rim-light lines), street ribbons by class width, all quantized to the 12-byte GE vertex (color u32, xyz i16) in 128 m tiles; route = Dijkstra legs between scenic waypoints (Flatiron → Empire State → Herald Square → Morgan Library), a 4.1 km closed loop. 2.6 MB pack total.src/(no_std EBOOT, gu-demo pattern): zero-copy.pdrvreader; streamer with a Chebyshev residency ring, one asyncsceIoReadAsyncin flight, ahead-of-car load bias, GE-safe eviction, and a 30-frame rise animation via the per-tile model matrix; zero-triangle infinite-ground backdrop split at the computed horizon row; GE fog into the same haze color; miter-joined navigation ribbon; box-art cars (player + 16 traffic both directions) following the route by arclength with corner slowdown; orbit→chase camera; capture contract identical to gu-demo. Falls back to an embedded pack (DRIVE_PACK) with simulated load latency when no file is present.scripts/pocket-drive.ts: cook → cargo psp → pack onto the emulated memstick → PPSSPPHeadless → PNGs.Typical frame: ~35 tiles, ~10 k tris, ~80 draw calls.
Verification
statsfeature (121 async tile loads in the opening seconds, all polled non-blocking).pocket3dworkspace stillcargo checks clean (new crate is workspace-excluded likegu-demo).Map data © OpenStreetMap contributors (ODbL); the pinned extract is a derived database.
🤖 Generated with Claude Code