Startup presentation
Glide startup presents the active Glide implementation’s 3dfx splash and
system/STARTUP2.GXA. The splash is supplied by Glide, rather than by a
Redguard movie file.
In final-version mode, a valid SAVEGAME.SAV opens the book-style main menu.
MENU.INI [general] ignore_autosave bypasses autosave handling and enters the
starting world without Introduction. With that flag off, an absent or invalid
autosave follows the fresh-game path: startup plays the Introduction cinematic
before loading the introductory game world. Non-final-version startup also
enters the starting world without Introduction. New Game from the book repeats this
movie-before-world sequence. A book opened from a running world uses the in-game
entry context described in Book menu.
The title image is a single 640×480 frame. The original also draws small version and loading labels along its bottom edge.
Title labels
The title redraw selects the [system] gui_low_font entry from SYSTEM.INI.
The GOG configuration points to fonts\\arialvb.fnt, a 9-pixel line-height
font. The version label starts at (10,467) and requests VGA colour
(32,32,32). Its format is
Version %s.%s, filled from the executable’s
version stamp; the GOG release displays Version 1.0.1.0
and the demo’s RGFX.EXE displays Version 1.0.5.0. Loading
text is right-aligned to (630,467) and requests VGA colour (50,0,0).
The map-registration
stage supplies Loading Map %d. Sound preparation supplies Loading Sound.
The colour requests are six-bit palette searches, not direct eight-bit RGB.
The search excludes index zero and returns the first exact match. Approximate
matching excludes white. Per-channel difference is request - candidate when
nonnegative and its bitwise complement otherwise. Candidates with all three
differences at most eight compete by absolute weighted-brightness difference,
using integer weights 19661, 38666 and 7209 for red, green and blue. A weighted
difference at most 24 selects that result. Otherwise the search minimizes the
sum of the three channel differences. Approximate ties select the last index.
The low font replaces nonzero glyph pixels with palette index 161. The glyph texture retains those indices and uses the active palette when drawn. Its RGB multiplies the selected text tint component by component, divided by 255. Thus both the selected tint and entry 161 of the title palette determine the visible label colour; the font file’s own entry one does not supply it.
Glyph bitmaps use their FNT left and top offsets. Each active character advances by its bitmap width plus one pixel. Space additionally advances by the width of the next glyph, the exclamation mark. Text-width measurement uses the same advances. These rules follow the title caller, text-width routine, and glyph-drawing path, independently of the font-file fields.
Version stamp
The version and build numbers are not compiled into the engine. At startup
the engine opens its own executable and reads a 28-byte XVER trailer from
the end of the file. All fields are little-endian.
| Offset (from EOF) | Size | Type | Name | Description |
|---|---|---|---|---|
| -28 | 4 | [u8; 4] | magic | XVER |
| -24 | 4 | u32 | version_major | First number of the game version |
| -20 | 4 | u32 | version_minor | Second number of the game version |
| -16 | 4 | u32 | build_major | First number of the build |
| -12 | 4 | u32 | build_minor | Second number of the build |
| -8 | 4 | u32 | field_18 | Zero in the shipped executables |
| -4 | 4 | u32 | field_1c | Zero in the shipped executables |
Each pair is formatted as %d.%d. The game version and the build fill the
two %s fields of the title label, and the build is the Build value shown
in the F1 version information. Without the trailer, both pairs stay 1.0.
| Executable | Version | Build | Title label |
|---|---|---|---|
CD and GOG RGFX.EXE | 1.0 | 1.0 | Version 1.0.1.0 |
Demo RGFX.EXE | 1.0 | 5.0 | Version 1.0.5.0 |
The executable also carries change notes for its build, shown with the version information:
- Build 1.0: “Fixed camera reset bug, (see leaving the catacombs).”
- Build 5.0: “Fixed rope death-reattach bug.”, “Fixed texture binding crash bug on certain object flats.” and “Fixed run of edge fall ‘stutter’ bug.”
See Demo release for the other differences of the build 5.0 executable.
Version information acknowledgement
The pre-world Version Information screen displays the executable’s build notes
and a <Continue> prompt. Return acknowledges this screen and allows world
loading to proceed. This acknowledgement occurs before a selected player and
ordinary world updates are available, including when startup targets a world
directly.
Splash variants
The full DOS glide2x_emu.ovl contains the older “3Dfx Interactive” logo on a
white shield with blue and yellow borders. DOSBox-X Voodoo emulation runs this
hardware-facing overlay and displays that animation.
The small DOS forwarding glide2x.ovl routes Glide calls to a host Windows
wrapper. A wrapper using 3DfxSpl2.dll displays the later metallic lowercase
3dfx logo with an orange swoosh. The DLL’s 1999 branding postdates Redguard’s
1998 release. The GOG install includes both paths, so the active Glide
implementation determines the splash. OpenGLide’s NoSplash and nGlide’s
splash setting can also suppress driver startup presentation.
The GOG release’s Windows launch runs its bundled DOSBox with Glide
passthrough ([glide] glide=true) to the bundled OpenGLide wrapper, whose
glide.ini sets NoSplash=1. That DOSBox build has its own [glide] splash
option, which defaults to on and which the GOG configurations do not set.
When the game first opens a Glide window successfully, DOSBox loads
3DfxSpl2.dll from the DOSBox directory and plays its animation once. GOG
Windows players therefore see the metallic splash. Emulated Voodoo hardware,
such as DOSBox-X with glide=emu, runs the full overlay and shows the shield
animation instead.
The DLL resource contains authored geometry, textures and commands for the later animation. The older animation remains available in the DOS overlay tables. These assets are separate from the Smacker New Game introduction.
Windows splash rendering
The DLL command stream supplies the camera, horizontal FOV, model transforms,
material selection, and positional light. Multiply each model transform by
the camera transform. Negate the resulting position and normal Z components,
then normalize the normal. Projection uses the same scale on both axes,
W / (2*tan(horizontal_fov/2)), and centers the viewport. The Glide origin
is lower-left.
Geometry without flag bit 3 uses its authored UV pairs multiplied by 256.
Geometry with that flag intersects the positive normal ray from the transformed
vertex with a sphere of radius 400 centered at the view origin. The far
intersection supplies S/T as (intersection.xy/400 + 1) * 204.8.
Texture coordinates are perspective-correct. Textures use bilinear filtering.
For a normalized light direction L and normal N, diffuse is max(dot(N,L),0).
The reflection direction is normalize(2*N*dot(N,L)-L). Specular is the eighth
power of its nonnegative dot product with the normalized view direction.
The view direction is the camera matrix’s third column with negated Z.
One lighting contribution uses direction (1,1,-1)/sqrt(3); the other uses
the authored positional light minus the transformed vertex. Beyond a squared
light distance of 4,000,000, the positional contribution is multiplied by
(4,000,000/distance_squared)^4. Vertex RGB, in byte units, is:
RGB = clamp(255*positional_RGB*(positional_diffuse + positional_specular)
+ 255*(directional_diffuse + directional_specular) + 16, 0, 255)
During full playback, texture RGB multiplies interpolated vertex RGB. Constant material RGB is used by the single-frame drawing path, which bypasses textures. That diagnostic path therefore differs from full animation playback. Triangles cull by winding. Polygon edges are drawn through Glide’s antialiased line path after pending edge groups flush.
The timed-frame command overlays black before presenting. Its alpha is 1 for
frame counters below 24, then 1-(frame-24)/8 for counters 24 through 31.
Frames from counter 32 onward have no overlay. After presenting, both color and
depth are cleared for the next frame. The final untimed redraws precede a fade
of 2*frame_rate swaps, each waiting two refresh intervals. Fade alpha starts
at zero, then uses the truncated byte value 102*step/(2*frame_rate).
The black overlay accumulates separately on the two alternating buffers.
DOS overlay splash
The Glide splash tables contain the geometry, textures, and authored transforms. No executable code needs to run to extract or display the animation.
The full animation renders authored frames 1 through 74. Frame zero is not part of that playback. Each frame presents with a buffer swap that waits two vertical retraces. Redguard opens Glide at 60 Hz, so the animation advances at 30 frames per second. Each mesh’s position uses its column-major affine matrix; its normal uses the linear part without translation or normalization.
With a viewport of width W and height H, a transformed point (x,y,z) maps to:
screen_x = (x/z) * 0.75W + W/2
screen_y = (y/z) * H + H/2
The splash uses a lower-left origin. Texture coordinates are perspective correct, with 256 S units across the longest texture dimension. A 2:1 texture uses 128 T units. The renderer enables bilinear filtering and selects the nearest mip level.
Vertex lighting uses L = (-0.57735, -0.57735, -0.57735) and
brightness = (dot(L, transformed_normal) + 1) / 2.
| Material | Appearance |
|---|---|
| 0 | Logo color texture multiplied by vertex brightness; additive highlight pass |
| 1 | Highlight texture sampled using the transformed normal; vertex brightness does not modulate the sampled color |
| 2 | Vertex brightness multiplied by RGB (10,75,120)/255 |
| 3 | Vertex brightness, equal RGB channels |
| 4 | Vertex brightness multiplied by RGB (248,204,0)/255 |
Highlight S/T coordinates are (128 + 128*normal.x, 128 + 128*normal.y).
Material 1’s intensity-factor table contains 0.125 in each channel, but the
texture-only color combiner bypasses that factor during full animation.
The outer shield and shield render first without depth writes. A projected shadow multiplies their existing colors, with fog disabled for that pass. The logo then renders with depth testing and writes enabled; its material-0 highlight adds to the existing logo color. Triangles use winding culling and face-selected edge antialiasing.
The fade is black fog on geometry. With 75 frames, fade-in spans the first 22
frames: before frame 22, visibility is the truncated 8-bit value of
255*(frame+1)/22, divided by 255. After frame 60, visibility is the truncated
8-bit value of 255*(75-frame)/15, divided by 255. Other frames have full
visibility. The background remains black.
Projected shadow
The shadow quad’s object-space corners are (-280,0,-160), (-280,0,150),
(280,0,150), and (280,0,-160), with S/T pairs (10.5,127.5), (10.5,0.5),
(255,0.5), and (255,127.5). Transform these corners with the logo matrix.
The light is (5,300,shield_translation_z - 1500); project the light-to-corner
lines onto z = shield_translation_z - 26. Screen projection is the same as
for geometry. Two triangles cover the quad, submitted in both windings.
S and T are stored multiplied by the projected point’s reciprocal Z. The per-TMU reciprocal-W field additionally contains the light-to-projected-point distance divided by Z. The splash sets no STW hint, so texturing ignores that field: S and T interpolate perspective-correctly with the projected point’s reciprocal Z, and the shadow texture spans the projected quad.
External references
World loading screen
World entry uses the destination’s WORLD.INI world_flash_filename GXA.
An archive with several frames supplies a randomly selected background; a
single-frame archive uses its only frame. The full-screen picture uses its
own palette. New-game entry uses start_world and start_marker from the
[world] section.
Completing the New Game Introduction, including leaving through its configured forward skip points, enters the starting marker with heading 1024 in the 2048-unit turn. The direct world-entry path that bypasses Introduction uses heading zero. The marker supplies position, not orientation.
At the 640 by 480 logical viewport, the progress bar’s track covers columns 32
through 608 and rows 448 through 454 (577 by 7 pixels, inclusive edges). The
track darkens the picture behind it to about a third of its brightness rather
than painting opaque black; the fill requests VGA RGB (63,0,0) but is drawn with the nearest palette colour (the system palette block’s entry 147, (54,5,4), on screens whose picture palette lacks an exact match; captures show it dithered around (218,21,14) in 8-bit) and reaches the
column 32 + width for a nearest-integer fill width of 576 times the completed
fraction (a full bar ends at column 608). The displayed integer percentage also
rounds to nearest. Percentage updates advance monotonically; a zero-percent
update does not draw the bar or label.
The percentage label uses FONTS/REDSEL.FNT at (32,451), with foreground
alpha 180 and shadow alpha 140 (fitted to captures: the text is translucent over the
picture, not opaque). The ordinary label is %d%%; debug output
can include world indices before it. These are world-entry loading visuals,
separate from the startup title’s small bottom-edge labels. World loading
does not display a right-aligned status message or an asset filename.
New-game entry and script-requested world changes fade the destination loading screen in from black, fade it out to black after loading, and then fade the first destination world view in from black. Each fade step changes a black overlay by 12 out of 256. World simulation resumes under the final fade-in; loading-screen fades do not advance the departing world’s ordinary updates.
The loading-screen black rectangle blends in encoded RGB channels, not linear
light, and leaves the picture’s indexed palette unchanged. For opacity a,
reconstruct the stored RGB565 destination using the ordered threshold at that
pixel, multiply each reconstructed channel by (256 - a) / 256 with integer
truncation, then apply the ordered RGB565 store again. Opacity zero leaves the
stored picture intact; opacity 256 produces black. The destination reconstruction
is the same as sun framebuffer blending, and
the rectangle uses the display-finalization blend state.