Commit Graph

58 Commits

Author SHA1 Message Date
vtroc7 c47684e141 Improve native rendering, background menus and community setup 2026-10-12 20:34:48 +03:00
vtroc7 efe6db6981 Restore native soldiers, barrels, chat and tracers; align weapon unlock admission 2026-10-12 00:05:28 +03:00
vtroc7 08b4224efd Add Theater editing and chat, improve controller UI, audio, combat and network recovery
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 21:43:30 +03:00
vtroc7 b8ded62c23 Restore T5 character animation, killfeed colors and killcam audio continuity 2026-10-11 00:10:03 +03:00
vtroc7 a2f189df10 Scope match lifetimes and restore gameplay and menu presentation
Prepare progression and loading through Bevy scheduling, preserve round HUD and bombsite props, restore grenade and T5 shadow presentation, and keep menus usable while classes load. Report update progress and continue startup after update failures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 23:01:34 +03:00
vtroc7 5273074e72 Integrate contributor rendering, gameplay and development fixes 2026-10-10 01:33:23 +03:00
JohnM c94e2197d1 Let pipelined rendering run on macOS by creating the surface during extraction
IW4L_PIPELINED_RENDERING=1 panicked on the first frame on macOS ("can only
access NSView on the main thread" in raw-window-metal), which is why the
default is off there. Bevy's create_surfaces takes a NonSendMarker so that
the multi-threaded executor hands it back to the main thread, but the render
app's Render schedule runs on a single-threaded executor. With pipelining on
that schedule runs on the render thread, so create_surfaces built the
CAMetalLayer there and touched the NSView off the main thread.

With pipelining on, macOS now also runs create_surfaces in the render app's
ExtractSchedule, after extract_cameras and so after the windows are
extracted. Extraction runs on the main thread, so the surface is created and
configured there. The Render schedule's instance then finds it configured
and skips, or after a resize reconfigures it, which only sets CAMetalLayer
properties and is allowed off the main thread.

The macOS default stays off, so nothing changes unless
IW4L_PIPELINED_RENDERING=1 is set. docs/BUILD.md now says how to turn it on
instead of pointing at the plugins.rs explanation this removes.

Measured on an Apple M3 (mp_terminal, 9 bots, uncapped present, bench
recorder), pipelining off -> on: 87 -> 105 fps average, frame p50 10.8 ->
8.3 ms, p99 19.4 -> 18.4 ms, worst frames about the same (36 -> 34 ms),
main/render overlap 5.4 ms per frame, presented state one frame older.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 05:23:47 +08:00
JohnM 9b0c1a9459 End a private match from End Game and return to the lobby
The Yes button of the pause menu's End Game popup is rewritten to
`disconnect` (03016c48). The host of a private match therefore quits
instead of ending the match: nobody sees the "Host ended game"
end-of-match flow, and the host lands on the main menu with the lobby
gone.

The button now sends the "endround" menu response to the game scripts,
which end the match as host-ended, run the end-of-game display and then
end the level, so the host returns to the private lobby. The hud still
turns that response into `disconnect` unless the local player hosts a
private lobby (ui_lobby_host set, ui_lobby_public not set), so public
lobbies and clients leave as they do today.

This reverses the end-game leave from 03016c48 for private hosts only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 03:45:37 +08:00
JohnM e4159bb901 Reopen the private lobby when its match fails to load
When a private match fails to load, the session returns to the menu
without a world and the frontend only handled that case for public
lobbies. The host was left on the main menu with in_lobby and is_host
still set but game_lobby closed by the loading screen, which also kept
the Community Servers switch locked.

A host of a private lobby whose map fails to load now gets game_lobby
reopened under the map error, the same way as after a match end.
Quitting during the load now resets the party, and the host stays on the
main menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 03:45:37 +08:00
JohnM da8ec04bb7 Return the host to the private lobby when the match ends
When the match scripts end a private match, the session swap already
tears the world down as MatchEnded, but ReturnedToMenu did not carry the
reason. The frontend treated every return from a world like a disconnect:
it reset the party, so the host landed on the bare main menu and Start
Game refused with "Only the lobby host can start a match" until a new
lobby was created.

ReturnedToMenu now carries the teardown reason (None for a failed load).
After a MatchEnded return the host of a private lobby keeps the party,
and once the main menu is open again the frontend reopens game_lobby over
it with map, mode and rules kept. If the main menu does not come up
within five seconds, the party is reset as before. Disconnects, failed
loads, public lobbies and clients still go to the main menu. Creating a
lobby or starting a match clears a pending reopen, so it cannot reset
the party later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 02:19:00 +08:00
vtroc7 91217cd0ac Restore native effects and objectives, scope zoom, camouflage and lighting 2026-10-08 22:04:32 +03:00
vtroc7 a2f4e0b857 Restore cross-game class previews and loadout customization 2026-10-08 00:19:44 +03:00
vtroc7 983fd97853 Publish prepared presentation contracts and predict local bullet impacts 2026-10-07 22:44:14 +03:00
vtroc7 25c008b391 Prepare coherent match assets, native camouflages and server releases
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:30:21 +03:00
vtroc7 7eff9406fb Connect native soldier hands and finalize match rule integration 2026-10-07 12:52:50 +03:00
vtroc7 ea45cf7dcc Preserve native families, soldier hands and T6 world materials 2026-10-07 00:13:36 +03:00
vtroc7 f1f4c07feb Bind prepared runtime assets to their owners and correct T6 rendering 2026-10-06 21:37:31 +03:00
vtroc7 d655b952cb Prepare asset products, restore T6 rendering and select community servers 2026-10-06 15:57:22 +03:00
vtroc7 f026f5fca0 Improve runtime readiness, rendering, audio and Linux game discovery 2026-10-05 23:41:16 +03:00
vtroc7 65052d3f51 Add native T5 audio, Black Ops II maps, independent movement, late join, skill ratings and varied bot loadouts
Decode Black Ops audio natively and load Black Ops II worlds, faction
models, equipment, materials, lighting and weapon camouflage.

Rework capsule collision, solid recovery, penetration, recoil, effects
and sentry placement; synchronize late joins and player event delivery.
Keep local skill ratings and signed player accounts.

Show the selected community and master ping on the main menu. Add twenty
asset-filtered class presets across IW4, IW5, T5 and T6, plus fifty-two
unique player-style names shared by AI bots and dummies. Honor the chosen
dev descriptor in the two-client approved scenario and credit contributors
and weapon, map and attachment QA testers.

Validated with the approved gameplay lifecycle and two-client dev-master
scenarios, installed class-asset audit, bot-name uniqueness checks and
Linux IW4/IW5/T5/T6 gameplay smoke runs. Foreign-weapon match-stat schema
coverage remains incomplete.
2026-10-05 13:13:28 +03:00
neptune 818ba83cc8 Run Black Ops II equipment as Black Ops II does
Tactical insertion: under IW4 rules offhands are bridged by name only, so
the upstream slot stand-ins no longer hand the scripts a flash for it (it
plants and sets the spawn again); hidden entities stay usable, so its
owner picks it back up.

Equipment stats: read T6 detonate delay/time, damage cone, forward and
view-relative up speed, the detonator flag (C4 detonates) and the
retrievable flag (owner pickup only where T6 allows it).

Equipment behaviour: iw4l_t6/equipment ports T6's bouncing betty, shock
charge, trophy system, sensor and EMP grenades onto IW4's scripts, plus
T6's one-of-each counts, claymore grace and respawn cleanup. The engine
reports those items under their own names, tags thrown grenades with
nativename/weaponmodel, keeps sensors planted, drops the claymore laser
from betty and trophy, and lets objective_team address one player (sensor
pings, drawn in FFA too; protocol 103).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:12:02 -04:00
vtroc7 d352dbdfd8 Discover Steam MW3 and Black Ops installations 2026-10-02 20:06:28 +03:00
vtroc7 d48a9f6502 Steam MW2 discovery, embedded licences, weapon variants, lock-on launchers, double-barrel fire and a two-client dev-master scenario
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 19:36:24 +03:00
vtroc7 dc1ea70cfe Refuse cargo tests in approved_tests and strip merge-train leftovers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:59:07 +03:00
vtroc7 2bcedf97fe Set the player archive password to t.me/contextrot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:25:31 +03:00
vtroc7 3adb14b5ba Document the prebuilt Windows release and ship it without a descriptor
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:23:31 +03:00
vtroc7 3694c35041 Audio control runtime, typed player accounts, self-updates, thermal and shellshock screens, third person, guided killstreak HUD, player cards, a lobby cheats toggle and god mode
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 15:57:27 +03:00
Liam McElhaney 062d633ad3 Take the cheat switch from the launch options
The match bootstrap set allow_debug_actions to true for every match.
The host therefore accepted the debug actions from any peer.

Add the --cheats launch switch for map, serve and menu.
The switch sets the HostCheats resource. The match install reads it.
Cheats are off when the switch is absent.
Pass --cheats in make map, the live recipes and the scripted harnesses.
2026-10-01 13:31:10 -04:00
vtroc7 bfe3c2aa70 Breath, shields, crossbow, car destruction, remote animation and GSC services
Scoped weapons hold breath with recovery feedback and sound. Riot shields
block and deflect bullets in hand and on the back; explosive crossbow bolts,
destructible map cars with round resets, and T5 map model collision work.
Remote players show last stand, weapon change, jump, mantle, landing,
ladder and stun animations, and server hitboxes follow the shared torso tree.

GSC gains spectator follow cameras, chat, kick, vehicle paths and flight
controls, physics spheres, slow motion, slide and mantle movers, damage
triggers, music, ambience, rumble and live audio fades over a shared mixer.

IW5 and T5 maps get sun shadows with per-stage sun selection; post-fx
pipelines compile before a vision blend needs them. The lobby browser keeps
focus and selection, and rooms can be password protected. Console supply
and give commands search every item category. Frames and replays decode
only the current wire protocol.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 19:18:44 +03:00
vtroc7 9dad890c20 Merge pull requests #33 #35 #38 #39 #40 #41 #42 #43 #44 #45 #46 #47 #48 #49 from gitoutofthere 2026-10-01 19:07:17 +03:00
Bulat Fatykh 6a6069a589 Escape interior NUL in Perfetto debug strings 2026-10-01 17:43:47 +03:00
Bulat Fatykh e21be0c4fb Preserve string token kinds in GSC parsing 2026-10-01 17:34:18 +03:00
Bulat Fatykh 1644e60a87 Validate incoming master room option requests before state changes 2026-10-01 17:32:55 +03:00
Bulat Fatykh 8c5457bc68 docs: clarify master settings for players 2026-10-01 17:07:23 +03:00
vtroc7 03016c48d6 Script-driven post effects, fog and earthquakes; equipment recovery, akimbo viewmodels, end-game leave and scope edges
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:01:29 +03:00
vtroc7 60f550a2b7 Support personal loadouts and fix lobby and menu interactions 2026-09-30 04:38:21 +03:00
vtroc7 38aa9cf741 Run IW4 match flow, menus and killstreaks from the game scripts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 18:35:44 +03:00
awsms 665d4ff6df Hold aim alongside toggle aim; mouse wheel directions in key bindings
Controls list Aim Down the Sight and Hold Aim Down the Sight; pressing hold
clears a toggle latch so release always leaves ADS. MWHEELUP and MWHEELDOWN
bind from the menu, the console and saved settings, and wheel scroll reaches
the game as discrete presses, so weapon cycling works on the wheel.

Closes #6
Closes #7
2026-09-28 17:51:18 +03:00
Luax b271b4d0a5 Run on macOS: the Metal surface is created on the main thread
- Pipelined rendering is off by default on macOS. The single-threaded Render
  schedule runs `create_surfaces` on the render thread, and AppKit only lets
  the main thread touch the NSView behind the Metal surface, so the first
  frame panicked in raw-window-metal. IW4L_PIPELINED_RENDERING still
  overrides it.
- docs/BUILD.md: macOS needs only the Xcode command line tools; game data is
  the Windows depot of a Steam copy fetched with steamcmd.
- README and docs index list macOS (Metal) among the platforms.
2026-09-25 21:59:09 +10:00
vtroc7 72ee2098da Improve killcams, combat effects, and asset presentation 2026-09-25 00:05:20 +03:00
vtroc7 73ea661667 Add killstreaks and fix collision, materials, and HUD 2026-09-24 18:54:31 +03:00
vtroc7 69cf9ff9fa Prepare weapon presentation and add alternate modes, device feedback and collision fixes 2026-09-24 05:30:17 +03:00
vtroc7 94e3983bfc Shared common content, prepared weapon families, and one way out of a session
- One common set per content profile, shared by every match and the loadout
  menu; a restart over the same map keeps its images and static geometry.
- Weapons resolve as families: attachments are chosen from each game's own
  tables, checked, and composed into prepared configurations with their
  first-person skeleton assembled once.
- Sessions end through one teardown and one process exit; retired resources
  are dropped on a worker, not the frame.
- Sound is captured by the walks that already read each zone.
- A loading screen that reports what the load is doing.
- Tests live only in crates/approved_tests (heavy_gameplay_lifecycle);
  publish-check refuses them anywhere else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 17:10:02 +03:00
vtroc7 52d31f1ee2 A loading screen that says what the load is doing, and a first-person rig prepared once per composition
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 23:28:55 +03:00
vtroc7 b7e00544bb Destructible props, a live scoreboard, and film vision on the console
Destructibles walk their stage staircase on the host: each stage carries
its model, the parts it throws off, the effects it fires on the way out
and the health it bleeds afterwards, and the loops a prop is speaking are
published as sound aliases the client resolves through the configstring.

The scoreboard, overhead names and the compass draw against the live
roster -- team identity survives player-supplied color escapes, ranks and
prestige come out of the menu tables, and the final snapshot is kept when
it lands ahead of the next scores command.

Film vision presets load from the map and common fastfiles; visionSetNaked
and visionReset transition between them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 14:41:01 +03:00
vtroc7 bca31343e5 Bots that fight and take objectives, and glass that cracks into real shards
Host bots bake a navigation graph off the clip map and walk it — drop and
break-glass edges, routes that resume across ticks under a shared per-tick
query budget, firing positions chosen from baked supports rather than a ring
around the bot. They pick a weapon, reload or switch when the magazine runs
out, and plant, defuse and claim flags on their own.

A broken pane now builds a planar crack graph and emits shards carrying their
holes and open cracks, so tessellation and repeated hits read the stored
geometry instead of assuming a convex fan from vertex zero.

Sun cascades are clipped to the view. Class select and the options menu match
the layout players expect. Weapon definitions load from IW5 and T5 fastfiles.

The test suite is removed: it had grown into scaffolding for the dig rather
than a description of the runtime, and new tests will be written against the
behaviour that stayed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 02:49:55 +03:00
vtroc 9856f91a98 Share one decode between askers, and time each frame from its own wall.
The split of an image variant into `payload` and `usage` is now what sharing
keys on. A registry holds the texels an archive entry decodes to — the mip
chain in one allocation, laid out as an upload wants it — and the `Image` is
built over them where the row is placed. Two materials that want the same file
under a different colour space or sampler cost one read, one inflate and one
decode, and the second of them a copy of the chain; the last asker copies
nothing, because the decode's own buffer becomes the image's. Asking whether a
name is a cubemap reads the thirty-two byte IWI header out of the entry instead
of inflating the megabyte behind it.

The resident-bytes ceiling is charged per payload rather than per batch, so two
batches pointing at one buffer hold one allocation between them. Load rows
split `produced_bytes` into `prepared_bytes` and `reused_bytes`: only the first
is work, and their sum is what the plan served. The merge census names who won
a disputed claim by plan id, not only that somebody did.

The frame clock closes the row and opens the next at the top of `First`, before
anything else runs, so every main-phase interval falls wholly inside one frame;
the frame the process exits from is closed at exit and its row carries
`partial`. Which spans are a frame's coverage roots is declared by
`Span::coverage_root` rather than read off a thread's stack — an executor is
free to run a schedule's `begin` and its `end` on two workers — and spans a
migration left behind are pruned. A counter measured on another thread is
charged to the frame it ran in through `emit_at`, and a sample that finds no
row is counted rather than moved to whichever frame is open.

`IW4L_PIPELINED_RENDERING=1` runs the render world a frame behind on its own
thread, and it is the only thing the switch moves; the manifest records which
branch a run took. The report gains `main/render overlap`, read off the
intervals rather than off the frame a render stage names as its origin. A
`bevy-trace` build writes bevy's own spans as a Chrome trace, which is the only
place the render graph's submit can be timed from, and
`scheduling.bevy_tracing` says whether a run was one.

Glass keeps its shattered material while damaged, scales the authored UV to it,
picks its shatter effect by whether the piece is landing, and carries the
surface normal on the presentation event.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 16:28:01 +03:00
vtroc d00bf2309a Separate the bytes an image decodes to from the wrapping around them.
An image variant's identity was one digest of the archive entries plus a bag
of option bits, which mixed two unlike things. The map type chooses between
the 2D and the cubemap decode, so it changes the bytes; the colour space and
the sampler state change no byte of the payload, only the `Image` built
around it.

The identity now splits along that line: `payload` digests the resolved
entries and the map type, `usage` carries the colour space and the sampler.
Sharing still keys on the whole variant, because the wrapping lives inside
the `Image` whose buffer would be shared.

The merge census reads the split. A discarded claim whose winner held the
same payload under a different wrapping was counted as overridden by another
source, which reported nothing to share where the same archive entry had in
fact been read into the same bytes twice. It is its own bucket now,
`discarded_same_payload`, on the discard line and in the image demand report.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 13:01:20 +03:00
vtroc c72783395d Charge a span to the frame it ran in, and prepare an image variant once.
A 47.78 ms frame reported a 36.35 ms `Load` inside an `Update` its own row
implied was 11.87 ms, and 364 frames summed their root spans to more than their
own wall. Three mistakes stacked: a span was credited to whichever frame was
open when it *closed*, its parent was whichever span had opened most recently
anywhere in the process, and the remainder was a sum of overlapping intervals
clamped at zero.

Now a span is charged by intersection with the frame's wall, and what it ran
before the frame opened is `carried_in_ns` rather than nothing. Nesting comes
from a thread-local stack, so the render thread no longer adopts the main
thread's spans, and a close out of order is counted. `unclassified` is wall
minus the union of the root intervals, which cannot go negative and counts two
threads inside one nanosecond once. The report prints how many frames still
hold a span longer than its parent.

`present_hud_surfaces` and `present_hud_stage_max` measured wall *between*
systems, which `.chain()` leaves the executor free to fill. They are renamed
`*_schedule_interval`, tabled apart, and given a number that is the HUD's:
`hud_tess_body`, taken inside the tess flush bodies, with `hud_tess_jobs`
beside it. The screenshot flag now stays up through the readback, the encode
and the write instead of only while the request queues.

An image decode gains an identity — the resolved IWD candidate list plus the
recipe bits that change the payload — so two plans that would prepare the same
bytes share one decode through a registry of weak handles, and a claim the
merge drops is reported as the same variant twice or as another game's
different image under the same name. Merge precedence and the final content are
untouched. The load job row splits budget wait from decode, renames
`join_wait_ms` to what it measures, and carries `produced_bytes`; the budget
wait is bounded so it cannot outlive a join order that stops guaranteeing
progress. The manifest walks the nested artifact cache instead of reading zero
files from its top directory, and prints the viewport the passes were sized by
beside the surface.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 21:19:25 +03:00
vtroc 2f71d93b3a Package what each run measured, and decode the match's audio once.
`make bench` printed two reports and left nothing behind but a text file, so a
number could be compared with another number from the same afternoon and not
much else. It now prints three and writes the run's own directory: `report.txt`,
`manifest.json` and `summary.json` beside the `trace.pftrace`.

Section [3/3] is the counters — the render stages, the GPU passes, and the
per-frame work census. A counter nobody sampled prints MISS rather than
`0.00`, and the counters and spans this build declares but this run never
reached are named at the end, so a hole in the instrumentation cannot read as a
fact about the workload. GPU passes overlap and resolve late, so they are never
summed.

`manifest.json` says what produced the number: the revision, the dirty flag,
the toolchain, the profile cargo actually built under, the locked `bevy` and
`wgpu`, the adapter and whether its device can time a pass, the window, the
pools, the env toggles and the cache state. The build half is baked in at
compile time, because asking `git` at runtime names the tree the process is
standing in rather than the build. A fact nobody could read is `null`, never a
plausible default.

Reading that report, `preparing match audio` was the largest stage of every
load — one row holding one number, which cannot tell a thousand cheap byte
loops from five hundred external processes. It is the second. Section [1/3] now
splits the stage by the decoder each clip took, in worker time, and counts what
each one prepared, failed, held and left resident.

The T5 XWMA decode goes through the artifact cache under `xwma_pcm`, keyed on
every input the decode reads, so a clip is decoded once per machine rather than
once per launch. A cold load still had to pay the first time: 515 `ffmpeg`
processes, 18.9 s of worker time, almost none of it decoding. A worker now
takes the jobs already queued and answers up to 64 clips through one process —
every clip its own input and its own output, nothing concatenated — which is
1.3 s for the same bytes. Failure stays per clip: a batch `ffmpeg` refuses is
re-asked one clip at a time, leaving the bad clip as the only failure.

`make bench-overhead` can point at either recorder, `VAR=IW4L_PERF` or
`VAR=IW4L_BENCH`; they are separate costs and each needs its own pairs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 19:43:47 +03:00