#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:
@@ -77,7 +77,7 @@ func test_a_client_joins_over_udp_generates_the_island_and_plays() -> void:
|
||||
assert_true(client.prediction.reconciles > 50, "%d snapshots compared" % client.prediction.reconciles)
|
||||
assert_true(client.prediction.max_correction < 2.0, "largest correction %.3f m" % client.prediction.max_correction)
|
||||
assert_true(client.own_position().distance_to(mine.position) < 10.0, "drawn %.1f m from where the server has it" % client.own_position().distance_to(mine.position))
|
||||
# The two bots ride the same barge.
|
||||
# The two bots ride the same ship.
|
||||
assert_eq(flow.entity_of.size(), 3)
|
||||
for handle: int in flow.entity_of:
|
||||
assert_true(client.remote.has(flow.entity_of[handle]), "player %d is drawn" % handle)
|
||||
|
||||
@@ -25,7 +25,7 @@ func before_each() -> void:
|
||||
assert_true(loop.match_flow.in_match())
|
||||
rng = RandomNumberGenerator.new()
|
||||
rng.seed = 1999
|
||||
# Both off the barge and standing on level dry ground, as if they had landed.
|
||||
# Both off the ship and standing on level dry ground, as if they had landed.
|
||||
var spot: Vector3 = _level_spot()
|
||||
_stand(HOSTILE, spot)
|
||||
_stand(VICTIM, spot + Vector3(0.0, 0.0, 6.0))
|
||||
|
||||
@@ -106,7 +106,7 @@ func test_two_people_join_play_and_are_sent_the_match() -> void:
|
||||
phases.append(notice["phase"])
|
||||
assert_eq(notice["seed"], flow.current_seed())
|
||||
assert_eq(phases.slice(phases.size() - 2), [Match.COUNTDOWN, Match.DROP], "client %d's notices: %s" % [index, phases])
|
||||
# Everyone starts aboard the barge together, so each sees all four players.
|
||||
# Everyone starts aboard the ship together, so each sees all four players.
|
||||
assert_true(_pump(func() -> bool: return receivers[0].entities.size() >= 4 and receivers[1].entities.size() >= 4))
|
||||
# Inputs arrive and steer: the server took commands, and each player faces its way.
|
||||
assert_true(_pump(func() -> bool:
|
||||
|
||||
@@ -62,9 +62,10 @@ func test_bots_leap_and_humans_without_commands_stay_aboard() -> void:
|
||||
if leapt_tick >= 0 and loop.sim.tick >= leapt_tick + Tuning.TICK_RATE_HZ * 5:
|
||||
break
|
||||
assert_eq(human.drop_state, Drop.ABOARD)
|
||||
assert_true(human.position.distance_to(loop.sim.drop.barge_position(loop.sim.tick)) < 0.001)
|
||||
assert_true(human.position.distance_to(loop.sim.drop.ship_position(loop.sim.tick)) < 0.001)
|
||||
assert_true(leapt_tick >= 0, "the bot should have leapt before the route ended")
|
||||
assert_true(bot.position.y < Tuning.BARGE_ALTITUDE - 20.0, "the bot should be falling, at %s" % bot.position)
|
||||
var ship: Vector3 = loop.sim.drop.ship_position(loop.sim.tick)
|
||||
assert_true(bot.position.distance_to(ship) > 50.0, "the bot should be well away from the ship, at %s" % bot.position)
|
||||
|
||||
|
||||
func test_same_seed_gives_the_same_match() -> void:
|
||||
|
||||
@@ -81,12 +81,8 @@ func test_a_clients_world_agrees_with_the_servers_through_a_scripted_match() ->
|
||||
assert_eq(loop.scripted.size(), 1)
|
||||
game = NetGame.new(loop, NetServer.new())
|
||||
game.adopt(CLIENT)
|
||||
leap_tick = sim.drop.duration_ticks / 2
|
||||
for tick: int in range(30, sim.drop.duration_ticks):
|
||||
var under: Vector3 = sim.drop.barge_position(tick)
|
||||
if sim.ground.terrain_height(under.x, under.z) > Tuning.ISLAND_BEACH_TOP + 2.0:
|
||||
leap_tick = tick
|
||||
break
|
||||
# Fire the mortar a little way into the voyage.
|
||||
leap_tick = mini(Tuning.TICK_RATE_HZ * 4, sim.drop.duration_ticks / 2)
|
||||
client = ClientGame.new()
|
||||
client.sample_input = _input
|
||||
client.receive(NetProtocol.CHANNEL_CONTROL, game.match_notice())
|
||||
|
||||
Reference in New Issue
Block a user