Commit Graph
2523 Commits
Author SHA1 Message Date
Stefan MaierandClaude Opus 5.5 792531577c VR: no facing from the headset or controller during a cinematic
Seated in a level's opening cinematic (a passenger), the right controller
turned the game's camera the flat screen shows. The scripted-camera rule
went back out: the main menu is a scripted camera and was immersive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:47:12 +02:00
Stefan MaierandClaude Opus 5.5 ee35524e65 VR: scripted cameras on the flat screen; hands held still under the system menu
A scripted camera outside a cinematic (a level's intro) was drawn in
stereo from the head, with the weapon at the controllers in it; it now
goes to the screen like a cinematic. Under the system menu the headset
reports no hands and the weapon fell back to the head; the hands last
seen in focus stand in meanwhile, their buttons let go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:40:58 +02:00
Stefan MaierandClaude Opus 5.5 ba3997e2f4 VR multiview: what the game projects itself gets its depth's parallax
Sprites, light volumes (a plasma bolt's glow) and lens flare tests are
projected on the CPU into screen pixels with w 1 and their depth in z, and
the widgets' vertex program takes them to clip space: taken for a point
1 world unit away, a bolt 30 away stood 3 m off in stereo and seemed to be
swallowed half way. Where w is 1 and depth is tested, the depth comes from
z by the shared camera's projection (mv_depth), and the eye's offset is by
it. (Also logs, once each, the other targets the pass draws into.)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:24:49 +02:00
Stefan MaierandClaude Opus 5.5 df45daed55 VR multiview: the sky as though infinitely far
The sky is drawn about the camera (its view has no position), so no eye
stands aside of it; the eye's offset made it a dome a few metres away,
flat and swimming (the sea in 'Halo' is the sky's). Its draws take rows
without the offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 18:52:40 +02:00
Stefan MaierandClaude Opus 5.5 d462f80fa9 VR: draw both eyes in one pass (multiview, first cut)
With GL_OVR_multiview2 (vr.multiview), the scene is drawn once, from a
camera between the eyes whose view takes in both (plus a margin), into a
two-layer back buffer: every NV2A vertex program gets a two-view variant
that moves each view's clip position to its eye (x' = a x + b w + c, from
the shared view's and the eye's edges and the eye's place; nv2a_vsh.c),
screen-space geometry excepted. Sampling the back buffer meanwhile reads
the left eye's picture; visibility counts are halved. The host copies each
layer to its eye's image (host_xr_copy_layer_array).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 16:37:28 +02:00
Stefan MaierandClaude Opus 5.5 428d5f113a VR: vehicle guns converge on the player's aim again, crosshair there
The game steers a vehicle gun's shots (within its deviation cone) at what
the camera aims at; VR had replaced that camera with the barrel's own
line, right on foot but not seated, where a Banshee's nose rises as it
hovers and a tank's turret lags: the Banshee's crosshair rode high. Seated,
the camera is now the player's eyes and the unit's aim (the stick's steer,
the controller at a gun), and the crosshair floats on that line; the
barrel-line crosshair is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 16:02:39 +02:00
Stefan MaierandClaude Opus 5.5 73e9bed243 VR test aid: both sticks held in spawn the map's next vehicle
debug.vehicle_spawn: holding both thumbsticks in for 1.5 s puts the next
vehicle the map has loaded (not the Pelican, dropship or lifepod) a few
metres ahead of the player, cycling through them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:55:25 +02:00
Stefan MaierandClaude Opus 5.5 167ec9a573 VR: a manned vehicle gun's crosshair on the line it fires along
A vehicle's gun, once manned, fires along its own barrel (not the aiming
vector) from its primary trigger, moved onto the vehicle's camera line if
it fires from its camera. The crosshair ran from the right hand along the
controller instead, and the Scorpion's shells landed above and behind it.
It now floats on the gun's own line (weapon_vr_manned_gun_line), as the
turret actually points.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:47:23 +02:00
Stefan MaierandClaude Opus 5.5 8756b1ba22 VR: raise the eyes over a hull by set heights only
The collision model's top lifted the Scorpion's driver onto the turret as
it swung over him (screenshots); it never caught anything the set heights
did not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:33:14 +02:00
Stefan MaierandClaude Opus 5.5 043f2c6db6 VR: a Warthog's driver sits nearer the windscreen
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:28:49 +02:00
Stefan MaierandClaude Opus 5.5 bcc40772f8 VR: the Scorpion's driver sees out over its hull
Like the Ghost's: the driver sits down in the hull (screenshot: the
compartment's inside). The raise applies to a vehicle's driver and gunner
only; riders on a tank's back sit on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:27:33 +02:00
Stefan MaierandClaude Opus 5.5 f761b082a9 VR: the aim passes through the player's own vehicle; gun eyes higher
The crosshair floated where the aim met the Shade's own neck.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:12:04 +02:00
Stefan MaierandClaude Opus 5.5 f1b9dbeea8 VR: apply the hull's eye raise in the seated camera
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:06:19 +02:00
Stefan MaierandClaude Opus 5.5 75e7036b61 VR: eyes raised over a Ghost's hood, a Banshee, a Covenant gun's shield
Their collision models leave out what hid the view (screenshots: the
Ghost's hood arches over the rider's eyes, the Shade's shield sits at
them). The eyes now rise by a set height per kind of hull
(vr.ghost_eye_raise, vr.banshee_eye_raise, vr.turret_eye_raise), and at
least over the collision model's top.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:05:54 +02:00
Stefan MaierandClaude Opus 5.5 034842dc4d VR: no first-person weapon at any vehicle's controls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:02:53 +02:00
Stefan MaierandClaude Opus 5.5 57ecc722c3 VR: no own body in a Ghost, a Banshee or a Covenant gun
Their rider bends down into the vehicle, and the eyes at his head looked
into his own shoulders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:59:55 +02:00
Stefan MaierandClaude Opus 5.5 4ab1661ac5 VR: see out over a Ghost's, a Banshee's or a Covenant gun's hull
Their riders sit down in the hull, drawn from behind in the game; from the
rider's head the view met its inside. The eyes now rise to above the hull's
top over the head and up to 50 cm ahead of it (a downward ray against the
vehicle's own collision model), plus vr.enclosed_seat_clearance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:52:35 +02:00
Stefan MaierandClaude Opus 5.5 4577b96fca VR: a vehicle's gun works as by its handles: tipped down, it rises
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:11:16 +02:00
Stefan MaierandClaude Opus 5.5 6146294562 VR: no crosshair at a wheel with no gun to aim
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:05:37 +02:00
Stefan MaierandClaude Opus 5.5 a6710f68ee VR: no first-person weapon at a wheel or a gun
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:55:29 +02:00
Stefan MaierandClaude Opus 5.5 2c32a7032c VR: own body at the wheel and the gun, gunner view back, clearer glass
Seated as a driver or gunner, the player's body is drawn (its hands on
the wheel or the gun's handles, as the seat animates them), its head
shrunk to nothing out of the eyes' way. A gunner's view is moved back from
the gun's sights (vr.gunner_camera_back). Glass tints and reflects half as
much (vr.glass_strength), which up close hid the view through the
Warthog's windscreen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:50:55 +02:00
Stefan MaierandClaude Opus 5.5 59b76697d2 VR: seated camera at the rider's head; X is the action button
Seated, the first-person camera stood where the seat's chase camera turns
about (the vehicle's middle, low); it is now at the rider's head marker.
X now does what the game's prompts say it does (action, reload); B takes
the flashlight (tap) and grenade switch (hold).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:29:08 +02:00
Stefan MaierandClaude Opus 5.5 e9e5984e11 VR: vehicles in first person, steered with the right stick
Seated, the view stays behind the player's own eyes (vr.vehicle_first_person)
and turns with the vehicle, smoothly between ticks (its interpolated
heading); the head looks around freely, and recentring faces the vehicle's
forward. A driver who steers by facing (jeep, boat, plane, scout, fighter)
steers with the right stick: aside up to vr.vehicle_steer_degrees off the
heading, up and down for pitch (vr.vehicle_pitch_degrees). Gunners, the
tank's driver and passengers aim with the right controller, and turn in
the seat with the stick. The crosshair and its distance follow the
vehicle's aim. While the vehicle turns the player, the eye images darken
from their edges (vr.comfort_vignette, host_xr_set_vignette).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:41:49 +02:00
Stefan MaierandClaude Opus 5.5 8ed3558fc7 VR: drop the grenade test logging
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:25:01 +02:00
Stefan MaierandClaude Opus 5.5 b97330e719 VR: draw the held grenade with the first-person hands
The hands are drawn over the world, so they hid the grenade wherever they
overlapped it, and turning the palm up showed it behind the hand. It is now
drawn in the first-person pass with them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:02:48 +02:00
Stefan MaierandClaude Opus 5.5 0656429c11 VR: the held grenade in the palm at hand size; throws keep their speed
The held grenade is drawn in front of the left palm (vr.grenade_right,
_forward, _up from the grip) at 0.55 of its size (vr.grenade_scale).
A hand-thrown grenade is no longer brought up to the projectile's final
velocity, which made every throw as far; strength now runs from 0.25 to
full at 5 m/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 10:58:02 +02:00
Stefan MaierandClaude Opus 5.5 2b988e10a9 VR: draw the held grenade in the left hand
The first-person view leaves out the player's body and what hangs from it,
the grenade in hand too. While the left trigger holds it, it is drawn at
the left controller each frame. Logs the grenade's hold and release for
testing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 10:49:12 +02:00
Stefan MaierandClaude Opus 5.5 dc4a724f8a VR: throw grenades by hand
The left trigger holds the grenade in the hand (the game keeps it there
past the throw animation); letting go throws it from the left hand, along
the fastest the hand moved over its last 150 ms, as hard as that was (full
at 4 m/s). Without a throw (vr.grenade_throw_speed, 1.5 m/s) the game
throws as before. The left hand's swing is no melee while throwing, and
the arms keep their pose through the throw animation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 10:37:43 +02:00
Stefan MaierandClaude Opus 5.5 aa1bc76916 VR: crosshair messages (reload, low ammo) stay in the HUD
Halo draws its centre prompts as crosshair elements of the weapon HUD.
Only the reticle states now go to the crosshair layer; the message states
are drawn in the head-locked HUD, also while zoomed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 09:52:06 +02:00
Stefan MaierandClaude Opus 5.5 74ad349bbf VR: draw the crosshair in its own pass, keep HUD messages whole
The crosshair used to be cut out of the HUD image (an 80x80 region around
the centre) and moved to where the weapon aims, taking with it whatever
else lay there, such as part of the reload prompt. Now it is drawn alone
first (hud_draw_crosshair), captured into its layer, and the HUD is drawn
afterwards without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 09:48:12 +02:00
Stefan MaierandClaude Opus 5.5 c8e64f3b2b VR: shots start from the crosshair's own point
Shots started at an offset from the unit's eye point (its sight
position), the crosshair at the same offset from the drawn camera; the two
need not agree, and the shots ran parallel to the crosshair's line, a few
centimetres higher (plain on the pistol's small crosshair). Both now start
at the same point in the world, the drawn weapon's muzzle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 09:37:35 +02:00
Stefan MaierandClaude Opus 5.5 69f4164f29 VR: aim assist traces along the weapon, so shots meet the crosshair
The projectile aim assist traces from the camera along the aim and turns
the shot, fired from the weapon, towards what that ray hits; in VR the
eyes' line runs parallel to the weapon's but higher, and shots landed
above the crosshair. For a VR player it traces and seeks targets from the
muzzle along the weapon's own line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 09:29:00 +02:00
Stefan MaierandClaude Opus 5.5 467c62b497 VR: one frame for the weapon's aim, model, crosshair and scope
- The weapon's frames are derived in one place: the controller's, the
  model's (turned so its barrel points where the controller does), and,
  with both hands on it, both turned alike by the turn that lines the
  model's grips up with the hands, measured in the model's frame (it was
  applied in the controller's, which tipped the aim up when gripping).
- The crosshair runs along that aim from the muzzle, as the shots do.
- The scope keeps its place above and ahead of the hand, moved only
  sideways over the barrel as drawn, facing back along the aim.
- Each weapon's barrel angle and gun node offset go to debug.txt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 09:22:26 +02:00
Stefan MaierandClaude Opus 5.5 e2954e6e71 VR: turn each weapon so its barrel points where it aims; scope on it
First-person models point their barrels in towards the screen's centre,
so the model pointed a few degrees left of where the controller aims and
shots, the crosshair and the scope went. The weapon camera is now turned
by the barrel's direction at the ready (the gun node's axis nearest the
camera's forward), which is logged per weapon, and the scope's disc sits
over the barrel as drawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 09:10:57 +02:00
Stefan MaierandClaude Opus 5.5 c3b72b5848 VR: shots and the crosshair start from the weapon as drawn
Each weapon's first-person model sits differently in the hand, and the
pistol's barrel ran a few centimetres left of the controller's aim, so its
crosshair sat right of it. Shots, the crosshair and the laser now start at
the gun node as drawn at the ready, along the controller's aim.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 08:11:25 +02:00
Stefan MaierandClaude Opus 5.5 917a2757ac VR: the crosshair where the weapon aims; the weapon stays zoomed in
- The weapon's own crosshair (red on an enemy, as in the HUD) is taken
  from the HUD's centre and floats where the weapon aims, as far away as
  what it aims at, facing the eyes, as large as the HUD showed it
  (vr.crosshair). The laser is off by default (vr.laser) and never shows
  over the menus.
- Zoomed in, the first-person weapon stays in the hand (the game hides
  it), the HUD's crosshair and zoom overlays give way to the scope, which
  has a fine cross of its own, and the scope's disc is 10 cm across.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 08:01:00 +02:00
Stefan MaierandClaude Opus 5.5 2581d7ee9c VR: a scope for the zoom, on a disc over the weapon
Zoomed in, the player's view is drawn once more, from the weapon along
its aim through the zoom's field of view, into a small square of the
back buffer (the first-person weapon left out), and shown on a disc over
the barrel that magnifies what it covers of the view by the zoom's
magnification (vr.scope_size). The weapon's zoom mask and filters no
longer darken the HUD before the eyes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:16:30 +02:00
Stefan MaierandClaude Opus 5.5 07dbf079ef VR: the wrist takes just the motion tracker; no log lines in the HUD
- The part of the HUD moved to the wrist is now just around the motion
  tracker's disc and its range (measured in a 640-wide HUD), larger on the
  wrist and without what else the corner holds.
- The terminal's log lines, which the beta prints over the bottom left
  of the screen, are left out in VR; the console, when open, still shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:07:54 +02:00
Stefan MaierandClaude Opus 5.5 87f552ea5e VR: the laser follows the barrel while a reload turns the weapon
While an animation turns the weapon away from where it aims (reloads,
drawing and putting it away, posing, venting), the laser follows the gun
node's turn from its ready pose. The ready pose is now kept only while
the weapon is held ready or firing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:49:04 +02:00
Stefan MaierandClaude Opus 5.5 e0b71215c7 VR: through a melee attack, keep the whole pose in the hand
The melee animation moves both hands about the gun (the right one to the
stock, the left one onto the barrel) and the left arm with them; holding
only the gun still showed that. The whole skeleton now keeps its pose
from before the attack, in the hand. The melee diagnostics are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:31:29 +02:00
Stefan MaierandClaude Opus 5.5 1ae451d3cb VR: melee damage from the swing's speed
The game scales a player's melee damage by the forward run (the lunge),
and a VR player punches standing: blows hit but did next to nothing. The
swing's speed now weighs the blow (half at 2 m/s, full at 4; three
quarters on the right grip), unless the run gives more. Melee attacks and
what they hit are logged in debug.txt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:21:47 +02:00
Stefan MaierandClaude Opus 5.5 8de21c2ea0 VR: the free left upper arm points at the shoulder
The free left arm keeps its shape on the foregrip, which left its upper
arm pointing anywhere (at the belly, looking down); it now turns about the
elbow to point back at the shoulder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:15:12 +02:00
Stefan MaierandClaude Opus 5.5 b4f3afdc9b VR: the free left arm keeps its shape; punches land where you look
- Bent to the shoulder, the free left arm's skin, bound partly to the
  skeleton's root at the other hand, tore into ribbons wherever the hand
  was far from where the animation has it. The whole arm now follows the
  hand as it is shaped on the foregrip; the shoulder IK is kept for the
  right arm and the left one on the weapon.
- A melee attack aims where the head looks (the right controller aims
  the weapon), and each one is logged; vr.melee_swing_speed is 1.5 m/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:10:03 +02:00
Stefan MaierandClaude Opus 5.5 a24f615b4e VR: twist the forearm with the hand
The forearm, turned only to point at the wrist, kept the animation's
twist while the free hand could roll half a turn from it, and the skin
between them collapsed into a ribbon. It now takes most of the hand's roll
about its bone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 21:49:44 +02:00
Stefan MaierandClaude Opus 5.5 62f451d8dc VR: a natural free left hand, melee by swinging
- The free left hand lines up with the controller as a hand holds it:
  fingers along it, the knuckles (little finger to index) up its handle,
  the wrist behind its grip.
- Thrusting a hand forward (vr.melee_swing_speed) is a melee attack; the
  right grip still is too.
- Through a melee attack the gun stays in the hand; its animation would
  swing it before the camera.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 21:42:05 +02:00
Stefan MaierandClaude Opus 5.5 1882ae06bf VR: arms that follow the hands, the left hand free or on the weapon
- The first-person arms' upper arms and forearms are turned (two-bone
  IK) to run from the player's shoulders, below the head, to the wrists,
  instead of floating with the weapon.
- The left wrist follows the left controller, its fingers with it,
  unless the grip closes at the weapon's foregrip (vr.two_hand_reach):
  then the hand holds the weapon, which aims along both hands.
- Left controller: grip holds the weapon, Y switches weapons, X is the
  flashlight, and held switches grenades.
- The first-person skeleton's nodes are logged once per weapon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 21:25:07 +02:00
Stefan MaierandClaude Opus 5.5 fff0df8d86 Android: fix audio, which never played; VR: wider look-at tests
- SDL 3.4 holds an audio stream's lock through its callback, and the
  game's data was put into the stream from the thread that runs the
  game's callback, which then waited for that lock for ever: the first
  callback never returned and nothing was heard. The data is now
  gathered and put in by SDL's own thread once the game is done.
- debug.audio_log logs the level of the mixed sound.
- In VR a player's unit sees what its head points at within 15 degrees,
  or what the weapon's laser points at, since the head only points
  roughly where the eyes look (the training's flashing lights ask for
  5 degrees).
- vr.log_performance also logs the unit's looking vector.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 20:43:16 +02:00
Stefan MaierandClaude Opus 5.5 bdd6ad3fc8 VR: the unit looks where the head looks
Scripts test where the player looks (unit_can_see_point, the unit's
looking vector), and the head only set it while the game let the player
turn; the training's "target each of the flashing lights" never passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 20:24:43 +02:00
Stefan MaierandClaude Opus 5.5 a4f4bbb6f0 VR: turning the head counts as looking around
The training at the start of the campaign waits for the look input
(player_control.c's action tests, from facing_delta), which the head
never produced. The view's turning since the last test counts too, once
past a few degrees.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 20:14:03 +02:00
Stefan MaierandClaude Opus 5.5 282991fc07 VR: aim with the right controller, the weapon in the hand
With vr.aim_with = "controller" (the default), on foot:
- the unit's aiming vector comes from the right controller, while its
  facing (the body, the view and the movement) keeps following the head;
- shots start at the muzzle of the weapon in the hand, kept inside the
  level from the camera as before;
- the first-person weapon and hands are posed from the controller
  (vr.weapon_forward/right/down place the model in the hand);
- the HUD's crosshair, which marks where the head looks, is left out, and
  a laser runs from the weapon to what it aims at (vr.laser).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 18:01:53 +02:00