Pirate Cove — Three.js pirate ship game with Gerstner-wave water physics and jungle isles#11
Draft
ilikevibecoding wants to merge 6 commits into
Draft
Conversation
… tests Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
…gle, effects, HUD Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
… deploy to Pages Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ot, seat cannons Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
…py trees, denser jungle Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
…py w/ ground AO, leafy shrubs, budget trim Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.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 this adds
A self-contained browser game at
pirate-ship/— captain a procedural pirate galleon around a tropical cove ringed by jungle islands. Built with Three.js 0.184 via CDN importmap: no build step, no binary assets — everything (ship, ocean, islands, jungle) is generated in code.Water physics (the core)
src/waves.jsdefines a sum of Gerstner (trochoidal) waves — swells, mid waves, chop. The same list feeds the GPU ocean shader (vertex displacement + analytic normals) and the CPU physics, so the ship floats on exactly the surface that is rendered.Environment
Controls
W/Ssails ·A/Drudder ·Spaceanchor ·Rreset ·Hhelp · drag/scroll camera.Performance
~29 draw calls / ~685 k triangles including the shadow pass, capped pixel ratio, one 2048 px shadow map, instancing everywhere, physics catch-up capped at 5 steps/frame (no death spiral on slow machines).
Testing
pirate-ship/test/physics.test.mjs, 17 checks): wave-inversion accuracy < 1 cm, flotation stability over 60 s, acceleration to cruise, steering both directions, grounding without tunnelling, reset.Play it
pirate-ship/, so it will be live at https://ehpurple.com/pirate-ship/Existing site content (phone app at the root) is untouched; the Unity project files are unrelated and unmodified.
To show artifacts inline, enable in settings.