Pirates Clash 2 — Real 3D Naval Battle Arena
Pirates Clash 2 — Rule the Seas is a complete, self-contained, browser-based naval battle arena rendered in real 3D (WebGL via a bundled three.js r128). You captain a sailing ship across a living ocean with genuine wave physics, trade broadsides with thirteen AI captains, collect gold and treasure, level up, and upgrade from a wooden Sloop to the mighty Dreadnought in the Shipyard. All graphics — ships, islands, water, sky, particles — are generated procedurally by code; all audio is synthesized at runtime with Web Audio. The only bundled file is the three.js rendering library, disclosed and MIT-licensed. There is no server, no database, and no build step: upload the folder to any static host and the game is live.
The game is a persistent arena, not a level list: bots spawn, hunt, flee, strafe and volley relative to your power; you loot coins and chests, dodge drifting mines, ram smaller ships to steal their gold, and climb an XP curve that scales the world against you. A ballistic gunnery preview traces every volley’s true flight path, a first-voyage tutorial walks new players through the real actions, and progress (gold, level, upgrades, hulls) saves automatically to the browser.
At a Glance
- Pure HTML5 / JavaScript in real 3D — WebGL rendering via three.js r128, bundled locally under the MIT License. No framework, no build step, no server, no database
- Everything is generated in code — ships, islands, palm trees, water, sky, particles and every sound and music track are procedural. The only third-party file is the disclosed three.js library
- Five ship classes — Sloop, Brig, Frigate, Galleon and the black-hulled Dreadnought — each a procedurally built 3D model with masts, billowing sails, rigging, gunports and a flag in your chosen color
- A living ocean — multi-wave swells, breaking crests, sun glitter, island shallows and surf collars; ships pitch, roll and heave on the actual wave field
- Thirteen AI captains that hunt prey, flee stronger ships, strafe at gun range, loot the map and respawn — scaling with your level, with their own gold, upgrades and hull classes
- True broadside gunnery — fire the battery that bears on the target, staggered cannonballs arc under real gravity, and a dashed ballistic preview arc shows exactly where the volley lands. The reticle flares red over an enemy hull
- Naval-range cannon combat — engage at up to 245 units; long shots at distant sails are a real tactic
- Ramming, mines and loot — ram smaller ships to steal gold, flee bigger ones, shoot floating mines before they touch your hull, and scoop up coins and chests with a magnetic pickup radius
- The Shipyard — 4 upgrade lines (cannon damage, reload, sails, crew) up to level 8/6, plus 4 hull upgrades; purchases are permanent and survive even the deepest shipwreck
- Full progression — XP levels with a golden level-up shockwave, gold economy, best-score records, all auto-saved to the browser
- Complete HUD — health with damage ghost bar, reload meter, gold counter, XP bar, live minimap with islands/mines/loot, “Richest Captains” leaderboard, killfeed, floating damage and gold numbers
- First-voyage tutorial — a skippable, step-by-step guide (sail, fire, loot, Shipyard, first sink) that completes on the actions it teaches, with touch-specific copy; replayable from Settings
- Cinematic feedback — hit-stop on kills, slow-motion sinking, broadside recoil rolls, screen shake, muzzle-flash lighting, wake trails, smoke and fire on damaged ships
- 100% synthesized audio — shanty-style music loop, sea ambience, cannons, splashes, ram crunches and UI clicks, all generated with Web Audio. No audio files
- Desktop + touch — mouse & keyboard with pointer-lock aiming on desktop; drag steering, pinch zoom and on-screen FIRE button on mobile. Fullscreen supported everywhere
- Settings that matter — master volume, music, effects, camera shake, FPS counter, graphics quality (Auto adapts to the device), tutorial replay and a two-click progress reset
- Zero build, zero backend — upload and play. No npm, no bundler, no server code, no database. First load fetches nothing from the internet
How It Plays
Set sail into a persistent arena. Steer with the helm (WASD) or drag steering on touch, aim with the mouse, and fire broadsides — the dashed arc previews the volley’s real trajectory, so leading a moving target is a skill you learn, not luck. Sink a captain and their gold scatters across the waves; sail over it to bank it. Spend gold in the Shipyard on damage, reload, sails and crew, or save for the next hull class. Bots loot, hunt and flee exactly like you do, and the world quietly scales to your level, so the sea never runs out of rivals. Die and you lose 10% of banked gold — respawn into the same fight, or retire to the menu with your progress intact.
Gameplay Details
- Five ship classes with distinct hull length, HP, speed, turn rate, cannon count and mass — Sloop through Dreadnought, bought in the Shipyard with gold
- Ballistic broadside gunnery — the battery that bears on the target fires; a rake fires both sides dead ahead/astern; staggered muzzle timing makes the volley ripple
- Ballistic preview arc — a dashed line rebuilt every frame from the exact volley solution, with a landing reticle that flares red over a live enemy hull
- Naval-range engagements — aim point extends to 245 units; bots open fire at 62 and orbit at gun range
- Sailing model — keel vs lateral drag, rudder bite scaled by way on, astern steering, momentum on release; ships heel into turns and recoil from broadsides
- Mass-based collisions — rams deal speed-and-mass damage, steal gold from the loser, and reefs scrape fast hulls
- Drifting sea mines with proximity fuses and chain detonation — or shoot them from afar
- Loot economy — coins and chests spawn across the sea, sinkings scatter the victim’s gold, and a magnet radius (upgradeable via Crew Quarters) hoovers it in
- XP and levels — kills and loot grant XP; levels buff the ship, heal on level-up, and quietly scale bot strength to match
- 4 upgrade lines (damage, reload, sails, crew) up to level 8/6 with geometric price growth; purchases are permanent across shipwrecks
- Death with consequence — sinking costs 10% of banked gold; respawn into the same world or retire to the menu
AI
- Threat/prey evaluation — bots compare power, flee stronger ships within 42 units, hunt weaker ones within 60, and loot otherwise
- Gun-range orbiting with per-bot strafe direction, predictive leading shots and accuracy spread
- Island avoidance and world-bound nudging so bots sail sensibly
- Persistent arena — 13 bots with names, flag colors, levels, upgrades and hull classes; sunk bots respawn on a timer so the sea never empties
Presentation
- Living ocean — five summed wave trains, CPU normals, crest foam with chop masking, island shallows, surf collars and a sun-glitter band that twinkles
- Procedural islands — seeded lumpy terrain with sand-to-grass-to-rock vertex coloring, palm trees with drooping fronds, boulders and gulls circling
- Ships that read as ships — lofted hulls with boot-top stripe, tumblehome, plank-strake decks, gunwales, stern castles, bowsprits, rigged masts, cloth-shaded billowing sails and a flag in the player’s chosen color
- Combat feedback — muzzle flashes with a shared gun light, smoke trails on player shots, splashes, spark/wood debris, hull hit flashes, burning ships at low HP
- Cinematics — hit-stop on kills, slow-motion sinking with foam and smoke, golden level-up shockwave, screen shake, damage vignette
- Full HUD — health ghost bar, reload meter with READY state, gold counter with bump animation, XP bar, rotating minimap with islands/loot/mines/ships, leaderboard, killfeed, floating numbers, on-screen name tags with health bars
- Menu with a live 3D scene — the ocean, ships and gulls keep running behind the main menu as a cinematic camera orbits a bot
Audio
- 100% synthesized — cannon booms (with distance attenuation), splashes, hits, rams, mines, coins, chests, level-up, horn, sink, UI clicks
- Music and ambience — a shanty-style loop and sea ambience, generated at runtime with Web Audio
- Settings — master volume, music and SFX toggles, all persisted
UX, Accessibility & Quality of Life
- First-voyage tutorial — six steps (sail, fire, loot, Shipyard, first sink, congratulations) that complete on the real action, jump forward when the player acts ahead, hide on death, resume on respawn, and can be skipped or replayed from Settings
- Context-aware hint system — staged onboarding tips with separate desktop and touch copy
- Settings panel — volume, music, SFX, camera shake, FPS counter, graphics quality (Auto/Low/Med/High), tutorial replay, two-click Reset Progress
- How to Play modal — illustrated icon cards for sailing, firing, looting, ramming, mines and the Shipyard, plus a full hotkey row
- Fullscreen and pause — one-key fullscreen (F), auto-pause when the tab is hidden, pause menu with Shipyard/Settings/How-to access
- Touch-first mobile support — drag steering, two-finger orbit + pinch zoom, on-screen FIRE, and copy that swaps itself for touch users
- Fail-safes — friendly error boxes for missing engine file or unsupported WebGL; corrupt saves fall back to defaults instead of crashing
Architecture
- Single HTML entry point — the buyer opens
index.html. It loads css/style.css and ten game scripts in a fixed dependency order (utils → audio → world → shipbuilder → game → battle → tutorial → ui → main), after the bundled js/vendor/three.min.js
- Classic scripts, no bundler — plain
<script> tags in dependency order — no ES-module import map, no transpilation, no Node runtime
- One dependency, fully disclosed — three.js r128 is bundled locally under the MIT License with its copyright notice preserved at the top of the vendor file and reproduced in
LICENSE.txt. There are no other third-party components — no fonts, no images, no audio files, no CDN calls. The game fetches nothing from the internet at runtime
- WebGL rendering with three quality tiers (low / medium / high) controlling pixel ratio, water mesh density, shadow resolution and cloud count. Auto quality steps down automatically if FPS stays below ~38, and a device heuristic (cores × DPR) picks the starting tier
- Procedural everything — ship hulls are lofted from 1D station curves (beam, depth, sheer) into smooth meshes; islands are seeded, lumpy terrain with merged palm/boulder props; the ocean is a displaced, vertex-colored plane with CPU-side normals, crest foam, shallow lagoons and a sun-glitter specular band; all textures are canvas-generated at boot
- Sailing physics — velocity lives in a vector with separate keel/lateral drag (so turns swing the stern out); the helm uses a rudder rate with way-dependent bite; camera is an orbit rig with pointer-lock mouse-look, pinch zoom and Q/E orbit keys
- No server, no database, no build step — progress and settings persist to
localStorage under piratesclash2_save_v1 and piratesclash2_settings_v1
- Data-driven content — ship classes, upgrades, bot names and flag colors (
SHIP_DATA), island layout (_buildIslands), XP curve (xpNeed) and tutorial steps (Tutorial.steps) are plain commented tables
Browser & Device Support
| Platform | Details |
| Desktop | Chrome, Edge, Firefox and Safari on Windows / macOS / Linux, with WebGL enabled |
| Mobile | iOS and Android. Touch drag steering, two-finger camera orbit and pinch zoom are first-class inputs; the on-screen FIRE button replaces the mouse |
| Audio Unlock | Web Audio starts on the first tap or click, exactly as browser autoplay policy requires |
| Slow Devices | Auto quality drops the tier when the frame rate dips, and the low tier disables shadows and halves the water mesh — mid-range phones stay playable |
| Failure Surfaces | Clear in-page error messages for a missing three.js file or unavailable WebGL, instead of a silent black screen |
Why Buyers Will Like It
- Instant to deploy. Upload the folder to any static host or CDN — or embed it in an iframe. No server setup, no database, no npm. WordPress, Wix and Squarespace embed snippets are in the documentation
- Real 3D that still ships as one zip. Procedural geometry and textures mean no model files, no texture atlases and no audio assets to misplace — yet the game renders a genuine 3D ocean with waves, shadows and billowing cloth
- Gameplay with depth. Ballistic gunnery, mass-based ramming, threat/flee AI, mines, loot magnetism and a permanent-upgrade economy give players real decisions every minute
- Retention built in. Persistent progression, best records and an XP curve that scales the world keep players coming back — the metric a portal owner cares about
- Easy to reskin and rebalance. Ships, upgrades, prices, bot names, flag colors, island layout and difficulty are plain, commented data tables. The documentation walks through each with copy-paste examples
- Buyer-friendly docs.
documentation/index.html covers installation (including WordPress/Wix embeds), a visual guide for non-coders, troubleshooting and FAQ
- Considerate by default. Auto quality tiers with FPS-based step-down, camera-shake and reduced-effects toggles, and a two-click reset — plus full touch support out of the box
Target Audience
- Game portals and casual sites that want a self-contained, instantly deployable HTML5 game with real 3D presentation
- Buyers embedding a game in a WebView app or an iframe (fullscreen-ready)
- Anyone who wants a polished pirate/naval arena game they can reskin and rebalance
- Developers who want a clean, commented three.js codebase to extend with new ships, weapons or game modes
Hosting
Upload the folder to any static host — no PHP, no database, no Node.js required. Open index.html and set sail.
Support
6 months free support via CodeCanyon (author: Tawajo). Questions answered within 24–48 hrs.