Repository navigation
Ariadne OW5q: a sea the relay's storms grow; clients follow it and draw the relay's world at its time - #1521
Merged
Merged
Conversation
On the relay's clock: the water's sea keyframes, the storms' front (wind.front) and a new storm-wind peak were timed on the app's world clock, which nothing drives once a holon runs the document's world on its own clock (holon::attach_world). On the relay a storm never grew the sea. SceneWorld::sync(clock) times them on the clock the world steps on; follow() passes its own. Published: the relay puts each water node's last sea keyframe in room_world_on (seas: the old and new keyframes' winds, the crossfade, the count and the tick its field goes in after), since a sea lags its wind and a client that came later cannot grow the same one. Followed: a client's replica makes the same sea from it (WaterRuntime::follow_sea, SceneWaterSeaClock::follow) and hands the holon the new water with that tick (world_replica::water_revision, water_from_tick; holon::set_water). A boat's model keeps its water by tick and floats each step on the water of the tick it ends on; a saved state carries the water it was saved on, since a world restores only onto that sea. A water node's new field no longer rebuilds the replica's statics (before, a document with water rebuilt them every frame). Tests: the storm lake on a holon's clock takes the same keyframes as on the app's, to the bit; the relay's launch on a storm-grown sea is within 0.5 mm of the client's model following the relay's sea, 2.5 mm on its document's; the replica follows the room's seas; a boat's model takes the water at its tick and replays onto the water before it.
…n sea The air on the hull: the replica's air (the scene's wind with the storms' fronts, a flow field) goes to the boat's model with the water, on the same timeline, so the storm wind blows on its hull as on the relay's. The client's air is the relay's to the bit. The relay's storms: room_world_on gains `weathers`, each weather node's live events and storm-wind peak with the tick it went in after. The replica's weather takes them at once (WeatherFriction::follow, SceneWorld::follow_weather) and makes its air again, which the holon takes as new water after that tick. The drawn sea: a water node shows another host's sea through two keys, water.sea (a keyframe in place of its own lag) and water.clock (the time it is drawn at), which the drawn node and WaterRuntime both read and seed empty. arigl writes them each frame after client_pump (show_relay_seas) for the water nodes of the relay's document its own document has, with the relay's time as the holon counts it, and the weather nodes' events and peak, so it draws the relay's sea at the relay's time under the relay's storms. Tests: the client's air matches the relay's at every point checked; the replica follows the relay's storms and makes its air again; show_relay_seas writes into a document of the same nodes only; a drawn water node follows water.sea at the next frame.
One key under the scene's state prefix, shown_clock (new shown_clock.h), is the time the scene is drawn at. Every drawn node whose look moves with time reads it in place of the app's world clock and seeds it empty: the water's waves, the weather node's storms, rain and lightning, the cloud sky, the forest's and a generated world's foliage's sway, and a wave_sea. It replaces the per-node water.clock and weather.clock keys. show_relay_seas writes it each frame with the relay's time as the holon counts it, and the sun: lighting.key_azimuth and lighting.key_elevation from the relay's key light in the room's scene env. Nothing moves the sun with time (no day cycle), so a sun the relay's document moves is followed. The fetch map is the last keyframe's: the relay's sea now rebuilds it when the open fetch moves too, as a client following the keyframe does. A sea followed from each of its keyframes is the grown sea's at every one. Tests: a sea followed from its 33 keyframes is the grown one's (the last differed before the fetch fix); show_relay_seas writes the shown clock and the relay's sun; a drawn storm is drawn at the shown time. Checked by hand with arigl snapshot: the same shown time draws the same image twice, another time another, on a lake and on lsystem_forest.ari.
A kinematic vehicle turns through its tick: the relay's kinematic box goes on a line between the bicycle's boxes at a navigator tick's ends, yaw included, so the pose's yaw rate is the tick's, and kinematic_vehicle_at now turns the box at it through the rest of the tick and starts the next tick at the relay's heading. Placed from samples every 4 ticks while turning: 2.3 mm off at a sample, 4.4 mm without the yaw rate. A jolt vehicle's wheels at the relay's steering: world::set_vehicle_steer puts a vehicle's steering actuator at an angle (clamped to its lock), and a jolt model placed from a sample that carries the relay's steering puts it there. Joining the relay's jolt Humvee mid-turn: 0.31 mrad of heading and 1.26 of attitude off at worst, 2.75 and 4.7 with straight wheels. A vehicle turned or sped up in place is placed again: the holon now re-places a predicted vehicle when its heading or velocity is off the sample by more than holon_config::reconcile_yaw_tol or reconcile_speed_tol, not only its place. Roadmap: the day-night cycle (FLEETS_AND_NIGHT_ROADMAP.md NL5) gains Joe's requirements: set against the system clock as an option, and a connected client on the server's time; D6 partly settled.
Ariadne OW5r: a sample corrects all of a vehicle's motion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OW5's seventeenth slice (ARIADNE_WORLDS.md §18.5): a sea the relay's storms grow. Stacked on #1511 (OW5p).
On the relay, a storm never changed the water's sea, because the sea was timed on a clock nothing drives there. It now runs on the holon's clock. The relay also publishes each water node's sea and each weather node's storms. A client's replica builds the same sea and air, and its boat model floats on them from the same tick. The client draws the relay's world at the relay's time: its sea, storms, clouds and foliage, under the relay's sun.
What changed
SceneWorld::sync(clock)).wind.front) and a new storm-wind peak.holon::attach_world, arisrv'sset_world_external), nothing drives the app's clock, so a storm's front never grew the relay's sea.follow()passes its own, andWaterRuntime::tickandWeatherFriction::read_keystake it.room_world_on's newseas).world_on_of,SceneWaterKeyframe).WaterRuntime::follow_sea,SceneWaterSeaClock::follow).world_replica::water_revision,water_from_tick;holon::set_water).dynamic_vehicle_model::set_water,jolt_vehicle_world::water_after).jolt_vehicle_saved::water), because a physics world restores only onto the sea it was saved on.world_replica::water, after the water). The replica's air, the scene's wind with the storms' fronts (a flow field), goes to the boat's model with the water, on the same timeline. The storm wind blows on the model's hull as on the relay's.room_world_on's newweathers).weather.events) and its storm-wind peak, with the tick that went in after.WeatherFriction::follow,SceneWorld::follow_weather). Nothing steps the replica's world, so it could not switch a peak in on its own.show_relay_seas, newshown_clock.h).shown_clock, is the time the scene is drawn at. Every drawn node whose look moves with time reads it in place of the app's clock, and seeds it empty: the water's waves, the weather node's storms, rain and lightning, the cloud sky's drift and morph, the forest's and a generated world's foliage's sway, and a wave_sea.water.seakey, a keyframe that replaces its own lag. The drawn node (with a body or without) andWaterRuntimeboth read it.show_relay_seaseach frame afterclient_pump. It writesshown_clock(the relay's time as the holon counts it), each matching water node's keyframe, each weather node's events and peak, and the sun.lighting.key_azimuthandlighting.key_elevation, which the clouds and the stage lighting are lit from. The client now takes them from the relay's key light, which the relay's document puts in the room's scene env, so a sun the relay moves is followed.SceneWaterSeaClock::advance). The relay's sea kept its fetch map when only the open fetch changed, where a client following the keyframe built a new one. It now rebuilds the map when the fetch moves too.Tests
AriadneSceneWeather.TheFrontsSeaGrowsOnTheClockAHolonRunsTheWorldOn: the storm lake, its world following a clock of its own as a holon runs it.wind.frontas on the app's clock, and the world's state hash agrees in all 1080 frames.AriadneOneWorld.AClientsBoatRidesTheSeaTheRelaysStormsGrow: the relay's holon runs a lake whose sea a storm's front grows (3 keyframes in 9 s), with a participant driving a launch across it. Two client models, each sampled every 4 ticks through the pose stream:AriadneOneWorld.AClientsReplicaFollowsTheRelaysSea:seascome back to the bit.water_revision1,water_from_tick600.water_revision2,water_from_tick300).client_pumphands the water to the holon.show_relay_seaswrites the relay's keyframe, shown time, storms and sun into a document of the same nodes (and nothing where it has none), and that document's water follows them.AriadneOneWorld.ABoatsModelTakesTheWaterAtItsTick, a model given a 14 m/s keyframe from tick 130:AriadneSceneWorld.ASeaFollowedFromItsKeyframesIsTheSeaGrown: a sea grown through a stronger wind, a turn and a shorter fetch, and one following each of its 33 keyframes, have the same h0, full fetches and fetch maps at every one. Before the fetch fix, the last keyframe differed.cvcgl_ariadne_physics:test_drawn_water_shows_another_hosts_sea: a drawn water node seeds its keys, and its field followswater.seaat the next frame.test_drawn_weather_draws_another_hosts_time: a storm alive at a shown time of 0 is gone at 600 s, and 0 again matches the app's own clock.arigl snapshot:water.seadraws a rougher, foamier sea at the same time.lsystem_forest.ari(forest, wave_sea, cloud sky): the same image twice at one shown time, a different one at another.Not done yet
Not verified
arigl snapshot(above), not in a joined client.