#72: The packet ship, the lifeline mortar and the gull-kite

Eric chose option B on #72. The drop is now the GDD's launch:

- A packet ship sails a seeded straight line past the island, offshore,
  as close in as it can while keeping 45 m of open water from any land
  (eight-way probes; up to 32 headings, then the four world sides).
- Jump fires the lifeline mortar along the look heading. How high the
  player aims sets the charge (-10 to 45 degrees: 16 to 110 m/s over
  the ground; every shot climbs at 75 m/s). The climb can't be steered
  and the kite can't open until the arc tops out. Riders still aboard at
  the end are fired towards the middle of the island.
- Drop.reach() mirrors the fall for both ways down (kite at the top, or
  a fall with the kite opening by itself); bots, the soak and autoplay
  clients and the tutorial pilot aim with Drop.aim_charge().
- Bots fire at their landing spot once abeam of it, when in easy reach
  at their own staggered moment, or just before the route ends, and open
  the kite early only when the spot is beyond the rest of a fall.
- Art: VesselModels.ship() (two-masted packet, tanned square sails, a
  salt-white boot-top, a bowsprit and the mortar on its bed, mirrored to
  face the island), the figure's gull-kite (figure.py), and a lifeline
  cord from the muzzle to each player still climbing.
- Renamed barge to ship and wing-sail to gull-kite throughout code,
  tests, captures, docs and the tutorial text. make match now defaults to
  seed 2, where the scripted player still harvests and builds.

Closes #72

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 12:49:21 -05:00
co-authored by Claude Opus 5.5
parent 4357861bd4
commit aa797580a7
69 changed files with 1753 additions and 847 deletions
+44 -8
View File
@@ -1,20 +1,20 @@
extends TestCase
## The client's picture of a match (issue M8): one view over a simulation, with every
## player, the barge, items and chests drawn from it.
## player, the ship, items and chests drawn from it.
func _match(bots: int = 3) -> ServerLoop:
return ServerLoop.new(2, 1, bots)
func test_draws_every_player_and_the_barge() -> void:
func test_draws_every_player_and_the_ship() -> void:
var loop: ServerLoop = _match()
var view: MatchView = MatchView.new()
view.setup(loop.sim, 1)
assert_eq(view.entities.figure_count(), 4)
assert_true(view.entities.barge().visible)
assert_true(view.entities.barge().position.distance_to(loop.sim.drop.barge_position(loop.sim.tick)) < 0.001)
assert_true(view.entities.ship().visible)
assert_true(view.entities.ship().position.distance_to(loop.sim.drop.ship_position(loop.sim.tick)) < 0.001)
# Passengers are spread over the deck, not stacked on one spot.
assert_true(view.entities.figure_of(1).position.distance_to(view.entities.figure_of(2).position) > 1.0)
assert_eq(view.entities.pickup_count(), loop.sim.pickups.size())
@@ -33,7 +33,7 @@ func test_follows_the_simulation() -> void:
loop.run_tick()
loop.sim.set_sea_level(6.5)
view.sync()
assert_false(view.entities.barge().visible, "the barge is gone once the drop is over")
assert_false(view.entities.ship().visible, "the ship is gone once the drop is over")
assert_false(view.entities.figure_of(3).visible, "an eliminated player isn't drawn")
var bot: SimEntity = loop.sim.entities.find(2)
if not bot.eliminated:
@@ -43,12 +43,12 @@ func test_follows_the_simulation() -> void:
view.free()
func test_gliding_players_show_a_wing_sail() -> void:
func test_gliding_players_show_a_gull_kite() -> void:
var loop: ServerLoop = _match(1)
var view: MatchView = MatchView.new()
view.setup(loop.sim, 1)
var bot: SimEntity = loop.sim.entities.find(2)
assert_false(view.entities.figure_of(2).sail().visible)
assert_false(view.entities.figure_of(2).kite().visible)
var guard: int = 0
while bot.drop_state != Drop.GLIDING and guard < 3000:
loop.run_tick()
@@ -56,7 +56,43 @@ func test_gliding_players_show_a_wing_sail() -> void:
view.sync()
view.entities.animate(0.1)
assert_eq(bot.drop_state, Drop.GLIDING)
assert_true(view.entities.figure_of(2).sail().visible)
assert_true(view.entities.figure_of(2).kite().visible)
view.free()
func test_a_player_climbing_the_arc_trails_a_lifeline_from_the_mortar() -> void:
var loop: ServerLoop = _match(1)
var view: MatchView = MatchView.new()
view.setup(loop.sim, 1)
var bot: SimEntity = loop.sim.entities.find(2)
assert_eq(view.entities.lifeline_count(), 0)
var guard: int = 0
while bot.drop_state == Drop.ABOARD and guard < 3000:
loop.run_tick()
guard += 1
loop.run_tick()
view.sync()
assert_true(bot.velocity.y > 0.0, "the bot should be climbing")
assert_true(view.entities.lifeline_count() >= 1)
# The line runs from the mortar's muzzle to the player.
var line: MeshInstance3D = view.entities.get_node("Lifeline0")
var from: Vector3 = view.entities.ship().transform * VesselModels.muzzle()
var to: Vector3 = bot.position + Vector3(0.0, 1.0, 0.0)
assert_true((line.transform * Vector3(0.0, 0.0, 0.5)).distance_to(from) < 0.05 or (line.transform * Vector3(0.0, 0.0, -0.5)).distance_to(from) < 0.05, "one end at the muzzle")
assert_true((line.transform * Vector3(0.0, 0.0, 0.5)).distance_to(to) < 0.05 or (line.transform * Vector3(0.0, 0.0, -0.5)).distance_to(to) < 0.05, "the other end at the player")
# The ship's mortar faces the island.
var ship: Node3D = view.entities.ship()
var muzzle: Vector3 = ship.transform * VesselModels.muzzle()
var centre: Vector2 = Vector2.ONE * Tuning.WORLD_SIZE_METRES * 0.5
var out: Vector2 = Vector2(muzzle.x - ship.position.x, muzzle.z - ship.position.z)
var to_centre: Vector2 = centre - Vector2(ship.position.x, ship.position.z)
var across: Vector2 = Vector2(cos(ship.rotation.y), -sin(ship.rotation.y))
assert_true(signf(out.dot(across)) == signf(to_centre.dot(across)), "the mortar should face the island")
while bot.velocity.y > 0.0 and guard < 6000:
loop.run_tick()
guard += 1
view.sync()
assert_eq(view.entities.lifeline_count(), 0, "the line goes once the arc tops out")
view.free()