Skip to content

MW4VR v11.94

Choose a tag to compare

@github-actions github-actions released this 22 Nov 14:06
· 12 commits to main since this release
Immutable release. Only release title and notes can be modified.
7501f36

v11.94: the mech's own arms beside the cockpit (#14)

  • Trial: the mech's own arms beside the cockpit, read from the outside view

Seen from the seat the game draws nothing of the player's mech. Seen from
outside it draws rigid parts, each with a matrix into the world: they are
read there once for each mech (vertices, indices, picture), put into the
seat camera's space and kept in mw4vr_arms<mech>.mwa. Those beside the
seat are drawn with our own cockpit, at the world's scale and depth.
They do not move against the torso. [vr] arms=1 (off by default),
arms_side, arms_low, arms_all.

  • v11.93: a target's mark whole, and none of it in the cross-hair's image

The cross-hair's part of the HUD picture is split by colour. A pixel's
green went to the cross-hair in proportion, so the little green in a red
mark's edge showed there as a pale mark wandering over the smaller
cross-hair; the mark's dark inside went there whole, taken for a digit;
and where the cross-hair lay over the mark, the mark kept gaps of the
cross-hair's shape.

Now a pixel that is clearly red or blue stays with the mark whole, dark
pixels count as digits only inside a green box, and the gaps are filled
with the mark's colour from both sides.

  • Trial arms: the parts are read in single frames only; arrow keys for the test plan

Reading went on in every frame from outside until parts near the seat
were found - with a camera far from the mech none are, and every draw's
constants came back from the graphics card: 2 pictures a second.

  • Trial: a glance's turn taken out of the camera - the game then draws the mech's own parts

While the pilot glances to a side (the game's look-left / look-right keys)
the game draws the player's mech in the cockpit view, arms and all. The
camera's turn against the game's own cockpit is taken out again, so the
view stays the seat's and the parts stay in the picture.
[vr] arms_glance=1 (2: the headings logged, nothing changed).

  • Trial glance: the game's own matrix kept apart from the seat's view

The right eye took the glance's turn out twice (its base was the left
eye's, already turned back), and the game's frustum planes stayed the
glance's: checked against the seat's view they were left alone, and the
world ahead was culled.

  • Trial glance: one angle about the upright axis, held at the quarter; the mod holds the key

Tied to the cockpit's matrix frame by frame the view trembled with the
mech's steps. Now only the glance's angle is taken from it, the full
quarter once it is near it. [vr] arms_glance_hold=1: the glance key is
held by the mod while the pilot sits in the mech (arms_glance_key).

  • Trial glance: the angle from this frame's camera; the held key pressed again

The angle was the frame before's: the view shook while the camera swung,
and showed one frame far off when the game's camera jumped (the key
pressed again during the swing back). And the pilot's own press and
release of the key ended the glance for good - now the mod presses it
again a few times a second.

  • Trial: the game's own state word of the player's mech set from the seat

Comparing the game's memory with and without a glance: the vehicle and
some seventy objects that hang on it have a word (+0x158) that is 2 from
the seat and 0x20 during a glance, and so have small link objects of
class 0x78c638 (+0x30). Set to 0x20 without a glance ([vr] arms_own=1)
the shoulders are drawn and the weapons fire as usual - the arms' own
shapes are not there yet. With it the diagnosis that found it:
mw4vr_memdump.txt writes the vehicle, the camera and what they point to.

  • Trial arms: they go forth and back with the mech's steps

From the seat the game tells nothing of its mech's limbs, but the
cockpit's sway is measured: left and right once for every two steps.
The long parts (the arms) go ahead and behind with it, one against the
other, and come to rest when the mech stands. [vr] arms_swing (m).

  • Trial arms: the swing eased at its ends; weapons above the cockpit drawn too

The swing is taken about the sway's own middle and against its usual
size, and eased towards both ends. A part whose middle lies above the
eye (the Marauder's gun on its back) is drawn like one beside the seat;
none that comes nearer to the eye than 1.3 m. [vr] arms_above, arms_near.

  • Arms: draw low-hanging arms, limit relative to the mech's feet

Below arms_low a part counts as an arm down to arms_deep (0.45) of the
way to the feet, if it is far out (arms_wide, 2.4 m) or long and slim.
Test head can nod: plan key pitch=, runner -Pitch.

  • Arms: remove the trials, document the feature

The glance, own-parts and memory-dump trials leave cam.cpp (back to main's).
README, ini example, readme and architecture describe [vr] arms.
clang-tidy: two findings in arms.cpp fixed.

  • Docs: path of the arms file

  • Arms: on by default ([vr] arms=0 switches them off)

  • Docs: arms default in the ini example, a stray word

  • v11.94

  • Cockpit stays with a small game cockpit; arms of mechs without joints stay put

The Marauder II's own cockpit has some thirty triangles; cut down to fewer
than ten by the picture's edge it was no longer taken for the cockpit and
ours was left out, and with five it counted as the view from outside. Now
three are enough while the cockpit was seen in the frames before, and three
count as a little.
[vr] arms_rigid names the mechs whose arms do not swing.

  • Back from the outside view with a small cockpit; hands swing with their arms

The seat is known again as soon as the game hands its cockpit's shape to
its renderer and a little of it is drawn - the Marauder II's cockpit, the
head a little down, never came to thirty triangles after a look from
outside. Parts beside the cockpit that touch a swinging arm (hand,
shoulder, gun) swing with it.

  • Arms: the Mad Cat Mk II's stay put too

SHA-256 of the package: e59f30399de24e98d502592fac9233b91c678ea62f5c4e4ed83819b4399b7358