Island.generate(seed) builds a 513 x 513 heightfield (2 m spacing, the whole 1,024 m world) from the match seed's "worldgen" stream: a warped coastline, a coastal shelf and interior dome, two to four summits joined by ridges, rolling and rocky detail, and flattened marsh in wet lowland. Land is scaled so the tallest summit lands between ISLAND_PEAK_MIN and ISLAND_PEAK_MAX, under the last tide. Each sample gets an elevation band (sea, beach, marsh, forest, highland, summit) for terrain materials. - Simulation generates the island unless a test supplies its own ground, and spawns players on dry land until the drop arrives. - The headless server logs world_hash in its start line. - Island.heightmap_hash() is SHA-256 over millimetre heights and bands. - tools/island_map.gd draws a top-down map with tide contours. - New island constants in tuning.gd; GDD gains an island section. Tests: a 100-seed sweep checks generation time (slowest 617 ms against 5 s), land area, at least two distinct high points, walkable land, bands, and that no more than 3% of dry land is cut off at sea levels 0 and 8 m (worst seen 0.87%). A separate server process given only the seed must log the same heightmap hash. Closes #9 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
156 lines
6.8 KiB
Markdown
156 lines
6.8 KiB
Markdown
# Tidewall game design
|
|
|
|
Tidewall is a third-person build-and-survive battle royale for Linux. Up to 24 players
|
|
or bots land on a procedurally generated island. They scavenge, fight and build while
|
|
the sea rises in phases and takes the low ground. The last player or team alive wins.
|
|
|
|
Every gameplay number is a named constant in the single tuning table,
|
|
[`src/sim/tuning.gd`](../src/sim/tuning.gd). This document refers to those constants by
|
|
name, so it can't drift from the game. To change a number, edit that file.
|
|
|
|
## What makes Tidewall distinct
|
|
|
|
- **The rising sea.** There is no circle closing in from the outside. The danger is a
|
|
water level that everybody can see and that rises on a published schedule.
|
|
- **Elevation is safe ground.** The map's shape decides where the fight goes. Valleys
|
|
flood first, ridges become islands, and the last land is the highest land. Reading
|
|
the terrain is a core skill.
|
|
- **Breakwaters hold back water.** A sealed ring of breakwater keeps ground below sea
|
|
level dry for a while. Water pressure wears them down, and enemies can breach them.
|
|
A breach floods everything behind it. A defended low-ground fort is a real and
|
|
risky strategy.
|
|
- **Seafaring folk art.** The look is weathered and hand-made, built on tarred wood,
|
|
rope, net floats and salt-faded paint. See [ORIGINALITY.md](ORIGINALITY.md).
|
|
|
|
## Core loop
|
|
|
|
1. **Launch.** A packet ship sails a straight line past the island. Each player picks
|
|
a moment to leave by lifeline mortar and steers a gull-kite to the ground.
|
|
2. **Scavenge.** Search wrecks, fishing huts and lighthouses for weapons and supplies.
|
|
Harvest driftwood, stone and salvage iron with the boathook.
|
|
3. **Read the tide.** Check the next flood line and decide where to be.
|
|
4. **Build and fight.** Raise cover, climb, wall off a position, or seal a breakwater.
|
|
5. **Climb or hold.** Move uphill with the water, or defend what you built.
|
|
6. **Last one standing wins.** Teams win when no other team has a living member.
|
|
|
|
## Match sizes
|
|
|
|
| Mode | Players | Constants |
|
|
|---|---|---|
|
|
| Solo | 24 players | `SOLO_PLAYERS` |
|
|
| Duos | 12 teams of 2 | `DUO_TEAMS`, `DUO_TEAM_SIZE` |
|
|
|
|
Bots fill empty slots. Offline play is a local server filled with bots, the same game
|
|
code as online play. A downed duo partner can be revived, within `REVIVE_SECONDS`.
|
|
|
|
## The island
|
|
|
|
Every match is a new island, generated from the match seed by
|
|
[`src/sim/island.gd`](../src/sim/island.gd). The server and every client build it from the
|
|
seed alone, and compare `Island.heightmap_hash()`, so terrain is never sent.
|
|
|
|
- About a kilometre across (`ISLAND_RADIUS_METRES`), in the `WORLD_SIZE_METRES` square,
|
|
with open sea all round for the packet ship's approach.
|
|
- Elevation bands suit the tide: beach up to `ISLAND_BEACH_TOP`, wet flat marsh up to
|
|
`ISLAND_MARSH_TOP`, forest up to `ISLAND_FOREST_TOP`, then highland, and summit ground
|
|
from `ISLAND_SUMMIT_BAND`.
|
|
- Land rises from the coast over a broad dome, so each tide phase takes a ring of the
|
|
island rather than all the low ground at once.
|
|
- Two to four summits (`ISLAND_MIN_SUMMITS`, `ISLAND_MAX_SUMMITS`), at least
|
|
`ISLAND_SUMMIT_SPACING_METRES` apart and joined by lower ridges. The tallest stands
|
|
between `ISLAND_PEAK_MIN` and `ISLAND_PEAK_MAX`, always below `ISLAND_MAX_HEIGHT`, so the
|
|
last tide covers it. Late fights happen on several hills, not one.
|
|
- The worldgen test sweeps 100 seeds: land covers 30 to 70% of the world, at least two
|
|
distinct high points, 85% of land walkable, and no more than 3% of dry land cut off
|
|
from the main landmass at the first two sea levels.
|
|
|
|
`tools/island_map.gd` draws a top-down map of any seed, with a contour at each tide level.
|
|
|
|
## Tide phases
|
|
|
|
`TIDE_PHASES` is an ordered list of phases. Each one sets:
|
|
|
|
- `hold`: seconds the water stays still, with the next flood line shown on the map;
|
|
- `rise`: seconds the water takes to reach the new level;
|
|
- `level`: the sea height in metres at the end of the rise;
|
|
- `drown_dps`: damage per second to anyone in water above their head.
|
|
|
|
The last phase raises the sea above the highest ground, so every match ends. Players
|
|
standing in shallow water wade and slow down. Underwater, they lose breath over
|
|
`BREATH_SECONDS`, and then take the phase's `drown_dps`. Swimming is slow and leaves a
|
|
player unable to build or fire. Water flows along the terrain, so low ground that is
|
|
cut off from the sea stays dry until something opens a path.
|
|
|
|
## Building
|
|
|
|
Harvested materials are driftwood, stone and salvage iron, each capped at `MATERIAL_CAP`.
|
|
Pieces snap to a grid of `GRID_CELL_METRES` cells.
|
|
|
|
| Piece | Purpose |
|
|
|---|---|
|
|
| Wall | Cover and enclosure |
|
|
| Floor | Bridges and platforms |
|
|
| Ramp | Fast elevation |
|
|
| Roof | Overhead cover |
|
|
| **Breakwater** | Keeps water out; the only piece water can't pass |
|
|
|
|
`BUILD_PIECES` holds what each piece costs. `MATERIALS` holds each material's `health`
|
|
and `build_seconds`, and materials trade speed for strength. A piece goes up quickly but
|
|
reaches full health only after its `build_seconds` have passed. Pieces with no connection
|
|
to the ground collapse. Each boathook hit harvests `HARVEST_PER_HIT` material.
|
|
|
|
**Breakwaters.** Each holds up to `BREAKWATER_MAX_HEAD` metres of water above its base.
|
|
Every second under pressure it loses `BREAKWATER_WEAR_PER_METRE` health per metre of
|
|
head. Weapons damage it normally. When one fails, the water level equalises through
|
|
the gap at `BREACH_FLOW_METRES_PER_SECOND`.
|
|
|
|
## Weapons and items
|
|
|
|
`WEAPONS` holds damage, fire rate, magazine size, reload time, range falloff and rarity.
|
|
|
|
| Name | Role |
|
|
|---|---|
|
|
| Boathook | Melee and harvesting; always carried |
|
|
| Fowling Piece | Close-range spread |
|
|
| Dock Carbine | Mid-range automatic |
|
|
| Signal Revolver | Accurate sidearm |
|
|
| Whaler's Longgun | Long-range, single shot |
|
|
| Line Thrower | Fires a line to pull yourself to a surface |
|
|
| Powder Keg | Thrown explosive; damages structures heavily |
|
|
|
|
Items are in `ITEMS`: Sailcloth Bandage restores health, Brine Tonic restores more
|
|
health slowly, and Cork Vest adds armor, up to `PLAYER_MAX_ARMOR`. A player has
|
|
`PLAYER_MAX_HEALTH` health and `INVENTORY_SLOTS` carried item slots.
|
|
|
|
## Controls
|
|
|
|
Rebindable. Defaults for keyboard and mouse:
|
|
|
|
| Action | Default |
|
|
|---|---|
|
|
| Move | W A S D |
|
|
| Jump | Space |
|
|
| Crouch | Left Ctrl |
|
|
| Sprint | Left Shift |
|
|
| Fire / harvest / place | Left mouse |
|
|
| Aim | Right mouse |
|
|
| Reload | R |
|
|
| Interact | E |
|
|
| Build mode | Q |
|
|
| Next / previous piece | Mouse wheel |
|
|
| Cycle material | T |
|
|
| Inventory slots | 1 to 5 |
|
|
| Map | M |
|
|
|
|
Gamepad support is planned with the accessibility work in v0.6.
|
|
|
|
## Out of scope for v1.0
|
|
|
|
- Monetization of any kind: no store, currency, battle pass or loot boxes.
|
|
- Accounts, ranked play, global matchmaking or anti-cheat beyond server authority.
|
|
- Modes other than solo and duos, or teams larger than 2.
|
|
- Vehicles, or swimming combat.
|
|
- Platforms other than Linux, and mobile or VR.
|
|
- Voice chat.
|
|
- User-made maps or mods.
|