Commit Graph

58 Commits

Author SHA1 Message Date
chexit 12a706fb67 Refine the network track's class from the optical look (#136)
build / mod (push) Failing after 1m25s
- ClassEst::step_optical: the shared estimate's rule for one passive look —
  an unsure look (over OPTICAL_CLASS_MAX_UNCERTAINTY) names nothing, a sure
  one names a class, firms an agreeing probable, replaces a contrary guess
- Track::refine_class_optical: the minimal common method — class only; the
  plot, age, source, quality and own fire rights stay untouched
- Sim::apply_optical_classes: the explicit adapter, fed by each observation
  made this tick through OpticalObservation::estimate; a relay of the
  refined track carries the class as it was and gains nothing from it
- the post still holds no track, emits nothing and authorizes no shot;
  the refined class reaches the existing #133 track UI through the picture
- tests: network refinement, unsure look, relay/stale look add no
  confidence, equal observables refine equal classes, the step rules

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
2026-11-20 23:55:28 +03:00
chexit e5ee15a2ca Add passive optical observation post (#136)
- new Optical unit kind with its own catalog row and deploy item
- bounded one-contact line-of-sight checks against land and blocks
- day/night reach and hold timing; obstacle and unknown geometry block sight
- independent class observation with source, time and uncertainty, never DroneKind
- map/monitor/panel statuses and a line to the selected contact
- tests: day/night, wall/unknown, ageing, no kind leak, bounded work, passivity

Cherry-picked from 3ae21123964a9d3234bb2b3efc9ff926d64fc77d onto the
#132/#133/#134 base: the cue test's track literal now carries the shared
class/source/product/quality contract instead of a DroneKind.

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
2026-11-20 23:33:32 +03:00
chexit ac7521936d Estimate a track's class from its measurements, not from the target (#133)
build / mod (push) Failing after 1m18s
A radar track is what the network measured, and it never carried the
target's own answers: the tactical Track loses `kind: DroneKind` and the
true velocity, and gains what the measurements say instead.

- Track now holds a ClassEst (unknown / probable / firm) plus an observed
  velocity: none from the first blip, then the change of the measured
  places between real measurements, smoothed so one noisy pair does not
  flap the class. The classifier's bands sit between the game's speed
  clusters (Class::of_speed); a new contrary measurement replaces the
  hypothesis, an agreeing one firms it.
- The class estimate is separate from track confirmation (Track::ident):
  a track can be confirmed with its type still unknown. The estimate
  grows only on real measurements — a forecast and a relayed copy add
  nothing — and it travels with the measurement it grew from, ageing
  with the track and gone when the track drops.
- Roles, last chance, the reserve and the interceptor count read the
  estimate, never the target's class. Explicit policy for the unknown:
  an unidentified track stays a candidate under the general rules (and
  the system with no roles holds its fire at everything); the map, the
  monitor, the summary panel and /airdef why read the same estimate and
  name the reason — «Трек подтверждён · тип не определён», «вероятно
  крылатая ракета». The exact model stays in the sandbox's truth mode.
- A gun or a launcher lets go of a target that classified out of the
  roles since it was taken; a first blip no longer rules a contact out
  as a threat to guarded objects (it has no measured course yet).

Old saves and replays are untouched (tracks are derived, not persisted);
the simulation stays deterministic (the classifier is pure arithmetic on
the measurement noise). The doctrine/first-blip/last-chance tests gained
classified tracks where the contract provably changed; new tests cover
the classifier's steps, kind-independent estimates, first-blip blindness,
and relays and forecasts adding no confidence.

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
2026-11-20 22:55:36 +03:00
chexit d302204649 Make map and radar targets legible with an honest hover (#132)
- mini radar: class-shaped blips that merge into one with a count
- map: larger track markers and trails, hover card with distance, type,
  status, target and interception
- explicit network vs sandbox truth: true drones, routes and aims drawn
  apart from the network tracks, with their own trails

Co-Authored-By: Kimi Code <noreply@kimi.com>
2026-11-20 22:08:46 +03:00
chexit 306af49744 Move battery status text to the presentation adapter
Sam::status, Comps::describe/worst and Sam::parts_text formatted
player-facing Russian in the simulation. The adapter now owns that
text: battery_view::sam_status for the panel and map, why_view::parts
and why_view::worst for the monitor and the status line. The core keeps
the data and gains only the accessors the adapter needs
(preparing_cell, public cells/reload_time/magazine/gun facts).

Texts are unchanged; the adapter tests pin the existing strings.

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
2026-11-20 21:34:07 +03:00
chexit e7934a1ebb Give the enemy a structured intent and a durable route queue (#127)
build / mod (push) Failing after 22s
release / windows (push) Failing after 2s
Stage 2 of #127. A smart drone now carries why it is aimed where it is
(Intent: plan, sead, react, replace) apart from the aim bookkeeping
(unit, since, switches, confidence). Assignments are throttled per
adaptive tick and per contact, a fresh disclosure replaces an aim only
after a hold, within a switch cap and when the change is worth a new
route, and a killed aim is replaced as a separate, lower-priority
decision. The queue is bounded and taken by priority (plan > sead >
react > replace); unknown land is no longer free in a replanned route.

The autosave now carries the air state: the drones in flight, the launch
queue, every pending job with its id, aim, unit, version, priority,
intent and relief version, the contacts the jobs were chosen from and
the relief snapshots they plan over. The format is a versioned `air 1`
section; older saves read as before, scenarios do not carry the sky,
stale, ghost and duplicate jobs are cancelled on load, and the section is
bounded (512 drones, 512 route points, 4096 contacts, 8 reliefs, 900 KB).
A periodic save waits while a raid is only being planned.

enemy_picture() now explains targets and pending jobs (aims, aimed_by,
pending_jobs, reason, work_per_tick) in English, and intel_bench records
the queue and intent evidence next to completion, losses and failures.
2026-11-06 18:36:20 +03:00
chexit 8fc10c07a1 Give the enemy a last-observation picture and observed-capability pricing (#127) 2026-11-06 18:00:08 +03:00
chexit 1261c30724 Stage the cold launch and spool every interceptor's motor (#129)
The interceptor's launch is one sequence: the cap opens, the round is
thrown out unlit and slows under linear gas drag (`cold` ticks), the motor
lights where it has reached, it turns with a growing rate while thrust
spools up (`boost` ticks), and full guidance starts only at `cold + boost`.
A rail launch lights at once but spools over the same `boost` ticks; the
electric P1-SUN has no rocket spool or plume.

S-400/500 now hold the unlit ejection for 20/24 ticks (1.00/1.20 s at
20 Hz); IRIS-T/Tor keep shorter 8-tick throws. Ignition, its sound, flame
and recorded MotorIgnition event all use the missile's current position.
The RM48U strike follows the same 20-tick choreography, counts the throw
in its flight time and starts its recorded smoke at ignition.

Maximum speed, turn, accel, pk and every collision rule are unchanged.

Co-Authored-By: Kimi Code <noreply@kimi.com>
2026-11-06 13:35:35 +03:00
chexit a47812aadd fixup! Keep unfinished retarget routes in a bounded job queue (#127)
The relief snapshot was still global: a smart plan finishing while a retarget job waited could replace Sim::known_relief, so the pending route was planned on the newer map. RouteJob now carries Arc<KnownRelief> for its knowledge version; Sim::known_relief keeps the same Arc only to seed new jobs. retarget_relief reads the job's snapshot, and relief sampling, price grids and route caches are keyed by that version. The new regression makes a job wait, swaps the global relief for another grid with a wall, and checks the pending route and sample stay those of the original version; outside its grid is Unknown. Core release, adapter and WASM contract pass.
2026-11-06 12:57:36 +03:00
chexit 6f7b041c8b Keep unfinished retarget routes in a bounded job queue (#127)
A mass retarget used to clear every selected drone's route before the planner's per-tick work ran out: the rest flew straight for ever. Route jobs now carry the drone id, new aim, target unit, knowledge version and the intel snapshot, stay in a FIFO across ticks and are drained under the same WORK_PER_TICK. An old safe route is kept until its replacement is ready; a cancelled job falls back to a straight run. Jobs are replaced in place per drone, cancelled when the drone or unit is gone, and retarget routes reuse the original plan's known relief. An in-flight drone no longer turns to a unit behind its turning circle. Core release tests, adapter tests and the real WASM contract pass.
2026-11-06 12:57:36 +03:00
chexit ead87343d2 feat: generate simulation numeric profiles from catalog/specs.json
catalog/specs.json is now the single copy of the numeric rows for
DroneSpec, MissileSpec and SamSpec: speed, guidance, warheads, models'
parts, RCS, seekers, launch and motor sounds, mount drives, gravity,
the Oreshnik split height and logistics limits, plus the named part
sets. tools/gen_catalog.py generates airdef-mod/src/sim/specs_generated.rs
(included by mod.rs, so the mod and airdef-core compile the same rows)
and unit_specs_generated.rs (included by units.rs). The hand-written
spec matches are gone; DroneKind::spec, MissileKind::spec and
SamKind::spec read the generated constants.

load_specs validates the schema, sound references, kind coverage against
content.json, named-part references and unused rows. gen_catalog.py
--check already runs in the CI generated-assets step, so a JSON/Rust
drift fails the build.

Every value was compared with the literals at 632061d field by field.
The only mismatch was the P1-SUN motor voice pitch in JSON (1.6 instead
of the actual 1.7, the flame == 0 branch in voices.rs); the JSON was
corrected and behaviour is unchanged. Save keys, raid order, RNG and
gameplay traces are untouched.

Verified: core release 194 passed + 8 scenarios (7 ignored), adapter
64 unit + 1 boundary + 5 scenarios, WASM contract 27 steps, catalog and
model generators fresh, asset/sound/model-bound/report tests pass.
2026-11-04 21:00:35 +03:00
chexit daa9ed7cbc Use catalog sound identifiers throughout runtime
build / mod (push) Failing after 19s
Co-Authored-By: Codex <noreply@openai.com>
2026-11-04 16:01:19 +03:00
chexit 0c870c10d5 Represent damage diagnostics as typed reasons
Co-Authored-By: Codex <noreply@openai.com>
2026-11-04 15:59:18 +03:00
chexit 1f28f8361f Bound height cache invalidation per explosion
Co-authored-by: Codex <codex@openai.com>
2026-11-03 11:23:47 +03:00
chexit bb931ab95c Return loaded RM48U to depot by truck
Co-authored-by: Codex <codex@openai.com>
2026-11-03 00:18:44 +03:00
chexit a7b8cb980a Apply coast drag after interceptor burnout
Co-authored-by: Codex <codex@openai.com>
2026-11-03 00:02:50 +03:00
chexit e38ca0d9ab Match impact speed to swept segment
Co-authored-by: Codex <codex@openai.com>
2026-11-02 23:59:11 +03:00
chexit e3ca3fbd8c Release interceptor engine source at burnout
Co-authored-by: Codex <codex@openai.com>
2026-11-02 23:59:11 +03:00
chexit 44a023006d Use interceptor energy for residual fuse chance
Co-authored-by: Codex <codex@openai.com>
2026-11-02 23:59:11 +03:00
chexit f3985d5363 Record energy loss and exercise meeting geometry
Co-authored-by: Codex <codex@openai.com>
2026-11-02 23:59:11 +03:00
chexit 932a8b7761 Use swept meeting point for interceptor impact
Co-authored-by: Codex <codex@openai.com>
2026-11-02 23:59:11 +03:00
chexit 143d9b2858 Prototype finite interceptor motor and coast
Co-authored-by: Codex <codex@openai.com>
2026-11-02 23:58:54 +03:00
chexit 26b258f00f Add persisted radar emission switch
Co-authored-by: Codex <codex@openai.com>
2026-11-02 23:56:52 +03:00
chexit c775f31544 Deliver typed strike rounds by transport loader
Co-authored-by: Codex <codex@openai.com>
2026-11-02 23:55:56 +03:00
chexit c96676f3e5 feat: attenuate indirect blast damage behind known cover
build / mod (push) Failing after 18s
Use a bounded read-only pre-destruction occupancy sample; preserve conservative damage for unresolved geometry and do not defer or repeat damage on replies.

Co-authored-by: Codex <codex@openai.com>
2026-11-02 23:55:38 +03:00
chexit 966b52f9fc feat: add shared radar batteries and animated cold launch
build / mod (push) Failing after 18s
Separate search and engagement roles, support launcher-only SAMs, animate individual tube lids and delay ground strike spending until ejection. Preserve battery configuration and launch poses in saves and replay.

Co-authored-by: Codex <codex@openai.com>
2026-11-02 23:40:40 +03:00
chexit d4adbb1e47 Launch typed ground strikes from carriers and isolate presentation state (#118 #88 #89)
build / mod (push) Failing after 18s
Share read-only scene data for smoke and displayed blasts; preserve cold ejection and flight-relative recording samples. Keep finite typed depot inventory, expose per-world smoke readiness through the pinned API26 engine, and invalidate presentation resources on world changes.

Validation: core suite 156 unit tests plus 4 scenarios and the new targeted recording regression; adapter 50 unit tests, boundary check and 4 scenarios; real WASM contract 16 steps; asset pipeline and bounds checks; macOS Metal client build and HD frame.

Co-Authored-By: Codex <noreply@openai.com>
2026-11-02 22:23:09 +03:00
chexit 5620347ffe Add three art pilots and derive chassis envelopes from final models (#115 #114)
Keep authored JSON separate from generated output. Export rotated model bounds for SDK-free navigation and check grazing voxel corners. Include unretouched in-game before/after captures and explicit art/performance limits; pilots are an intermediate pass, not completion of the full asset set.

Co-Authored-By: Codex <noreply@openai.com>
2026-11-02 21:33:59 +03:00
chexit f28e68db62 Record measured scene transitions and isolate combat effects from recorder (#88)
Capture actual missile launch/ignition, track transitions, fire state, SAM health and components. Keep legacy fallback and bound scene transitions to 65536. Renderers still use incremental adapters; shared SceneTimeline remains follow-up work.

Co-Authored-By: Codex <noreply@openai.com>
2026-11-02 21:00:22 +03:00
chexit 5ad6ea8ad9 Share stable content IDs across raids, inventory and item dispatch (#91)
Co-Authored-By: Codex <noreply@openai.com>
2026-11-02 20:59:56 +03:00
chexit 5f07027faa Build canonical simulation without Horizon SDK and remove hidden launch fixes (#87 #107)
Preserve the adapter facade and move adapter-only checks out of domain tests. Late tracks do not reveal an unseen launch origin or its timestamp.

Co-Authored-By: Codex GPT-6.1 Terra <noreply@openai.com>
2026-11-02 01:17:03 +03:00
chexit 733dc07863 Keep radar-controlled gun accuracy independent of darkness 2026-11-02 00:45:14 +03:00
chexit 1a693763fd The player's picture and the enemy's intel apart from the truth (#93); world answers carry their context, worlds told apart by seed, a drone that can't reach its aim gives up (#90)
build / mod (push) Successful in 8m25s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 03:20:07 +03:00
chexit 557346548a Interceptors blow up only before blocks a probe confirms, not on a tree-top height; low flights hold height over unknown land
build / mod (push) Successful in 8m54s
release / windows (push) Successful in 22m27s
In a clean real game with 15 systems: interceptors scrubbed at relief 58 to 2, kills 33 to 46 of 82. Smart raids from 2500 blocks: crashes 10 to 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 03:03:31 +03:00
chexit 38e515dea9 Flights over unknown land hold a safe height, air starts wait for the land, systems and aims settle on the surface; map labels, filters, coverage by terrain and scenes
build / mod (push) Successful in 8m34s
Far raids over mountains with a 300-block known disc: crashes from 19 to 2 of 368 (mixed), 22 to about 9 (smart). Balance tests gain hilly land.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 02:19:31 +03:00
chexit 57a5426e65 Strikes on launch sites, command map and placement editor, fire doctrines, ground routes, acoustics switch and reverb
build / mod (push) Successful in 4m13s
#101: radars locate sites from launches, /airdef sites, /airdef strike; sites launch slower (15/25/50 ticks) so a strike can come in time. #48: M opens the map on the network's picture, with an editor. #47: guard, sector, reserve and salvo per system. #94: vehicles route round slopes and water and say when they cannot get through. #96: reverb, and a menu switch for the acoustics. #92: generated files are validated before the swap, repo map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 00:59:03 +03:00
chexit ccc3e20902 Playtest fixes: smoke by engine, searchlights, far launch sites that load their chunks, air defence balance, last chance and radar-cued shots, radars in smart raids, echo, Windows release build from a tag
build / mod (push) Successful in 4m4s
release / windows (push) Successful in 23m13s
Smoke: one rule by engine, no heat on trails, no trail on P1-SUN. Searchlights: two lamps a target, off with an empty sky. Halos fade before their reach and their sum is limited. Launch sites load chunks through the server thread, go off-map as a last resort, and reach 4000 blocks. Air defence: ranges x1.5, shots grow with urgency, claims released, /airdef lastchance, long shots on a big radar's tracks. Build: rust-toolchain.toml, airdef.py check, generator manifest and --check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 23:44:14 +03:00
chexit 766b292aec Continuous engine sound on drones and missiles, live and in replays, through persistent sound sources (#95, fork patch 37)
build / mod (push) Successful in 3m51s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:10:24 +03:00
chexit 545d4777e8 Kill outcomes: falling hull, breakup or air detonation by weapon and target, recorded for replays (#97)
build / mod (push) Successful in 3m54s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:47:03 +03:00
chexit 9bc94fa8aa Raids launch from real sites: 1, 2 or 4-5 sides, stock and launch queue, land first, then nearer land, then barges on water (#100)
build / mod (push) Successful in 3m50s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:36:43 +03:00
chexit b43d471706 Combat fixes: exact-ray answers tied to their segment and block (#73), no fuse kill through a wall while waiting (#74), seeker needs confirmed sight and stops reading true velocity (#75), combat RNG and ids independent of graphics (#85), saved layouts validated whole before the scene is touched, refused autosave kept (#86)
build / mod (push) Successful in 3m48s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:57:19 +03:00
chexit 2eb6763d03 Brighter paint, rebuilt drones and cruise missiles, vehicle detail and markings; one-line part status in the summary panel (#55)
build / mod (push) Successful in 4m8s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:40:27 +03:00
chexit 438d68d50f Replays show SAMs and the world as it was at raid time, film clock for exports; clouds and fog polish; shared texture generator, new missile bodies, octagonal wheels, tracked sides, charred wrecks (#55 part 1) (fork patch 33)
build / mod (push) Successful in 3m54s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:30:39 +03:00
chexit 76f680eba6 Searchlights with real spot lights and volumetric beams (#60); replay director: several angles per event, slow-motion kills, /airdef replay film and export to MP4 (#58) (fork patch 32)
build / mod (push) Successful in 3m32s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 09:28:13 +03:00
chexit 8a12225ba1 Replays in full HD with shader effects driven by the recording (#56), recorded clock survives gaps (#57), cinematic intercepts: layered sound with travel delay, big flash, light burst, exposure punch, shock ring (#51) (fork patch 31)
build / mod (push) Successful in 3m21s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 03:59:47 +03:00
chexit 5f8bff31b9 Smoke and trails from the mod (#54), materials, wetness and wind in HD (fork patch 28); collisions and guidance: unknown is not clear (#61), cache invalidation and ageing (#62, #64), exact rays for partial blocks (#63), raids use the accuracy profiles (#65), interceptors guide on tracks and seekers (#66), fires and their effects bounded (#69)
build / mod (push) Successful in 3m20s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 03:17:11 +03:00
chexit 6f3fc644bc Terrain-aware flight: drones look 8 s ahead and climb in time, the planner prices terrain, SAMs hold fire at targets masked by terrain (long-range ones loft over ridges), interceptors keep clear of the land or self-destruct in the air
build / mod (push) Successful in 3m24s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 23:39:44 +03:00
chexit e3148bf458 HD render fixes (#35-#39, #41) and replay time of day (#57) (fork patch 25); radar scan cycles with ageing tracks (#46), damage to individual system parts (#50), long-lasting fires (#52)
build / mod (push) Successful in 3m22s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 22:56:15 +03:00
chexit 8065f2225c Sunsets, volumetric clouds and fog in HD (fork patch 23, #53); missiles and drones collide with the world through new world queries (patch 24, API level 12; #42, #43); a direct hit destroys a system, strikes scatter by kind with a small miss chance (#49, #59)
build / mod (push) Successful in 3m24s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 21:44:59 +03:00
chexit ed2db8523b Shaders, profiling and the rest of the issues: GTAO and HD GPU pass timing in the fork (patch 15; #9), explosion effects culled early per pixel (#11), a native sim runner with scenario tests run in CI (#8), named scenarios (#17), /airdef why and failure counters in raid reports (#18), IRIS-T and AMRAAM models and launch sounds by kind (#28)
build / mod (push) Successful in 3m24s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 16:43:48 +03:00