A11: Chart, minimap and tide forecast
The island as a hand-drawn nautical chart: paper land with ink contours every 5 m (heavier every 25 m) and a coastline, the sea in the sea's ink, place names drawn from the seed, the barge's route, and the player's mark. The land the coming tide will flood is hatched, and land the sea has already taken is washed with the sea, so the forecast isn't told by colour alone. - Flood.forecast(level, structures): a copy of the flood spread to a level as update() would, with today's breakwaters. Changes nothing. - ChartMap: FULL (opened and closed with the new "map" binding, M) and MINI (240 m around the player, top left, during the drop and play). The paper is drawn once per world (about 270 ms) and shared; the forecast overlay is redrawn at most once a second, and only when the forecast level, the flood or the pieces changed. - PlaceNames: names from original coastal words and a word for each kind of place, the same for every player of a match. - make chart-captures renders the chart before and after the first tide. Solo matches have no teammates; ChartMap draws `mates` when duos (M7) give it some. Closes #51 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -202,6 +202,25 @@ func update(level: float, structures: StructureSet, seconds: float) -> int:
|
||||
return reached
|
||||
|
||||
|
||||
## The cells the sea will have reached once it stands at `level`, if the breakwaters in
|
||||
## `structures` (null: the ones last read) hold as they are now: a copy of this flood
|
||||
## spread to that level, as update() would spread it. Changes nothing here. For the
|
||||
## chart's tide forecast (A11).
|
||||
func forecast(level: float, structures: StructureSet = null) -> PackedByteArray:
|
||||
var copy: Flood = Flood.new()
|
||||
copy.side = side
|
||||
copy.cell = cell
|
||||
copy.floors = floors
|
||||
copy.flooded = flooded.duplicate()
|
||||
copy.fill_group = fill_group.duplicate()
|
||||
copy.sea_level = sea_level
|
||||
copy._blocked = _blocked.duplicate()
|
||||
copy._barriers = _barriers.duplicate()
|
||||
copy._structures_seen = _structures_seen
|
||||
copy.update(maxf(level, sea_level), structures, 0.0)
|
||||
return copy.flooded
|
||||
|
||||
|
||||
## Follows the sea level and advances filling basins, without re-spreading. Cheap
|
||||
## enough for every tick.
|
||||
func flow(level: float, seconds: float) -> void:
|
||||
|
||||
Reference in New Issue
Block a user