Skip to content

Add Incoming (PC, 1998, Rage Software)#926

Open
Tatsh wants to merge 2 commits into
magcius:mainfrom
Tatsh:incoming
Open

Add Incoming (PC, 1998, Rage Software)#926
Tatsh wants to merge 2 commits into
magcius:mainfrom
Tatsh:incoming

Conversation

@Tatsh

@Tatsh Tatsh commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Only known issue is that back-face culling is not properly implemented so I am placing this under Experimental until that is resolved.

20260627-screenshot141054 20260627-screenshot141125 20260627-screenshot141006 20260627-screenshot125528 20260627-screenshot130124 20260627-screenshot141259

Pull Request Checklist

Please check one of the boxes below:

  • Generative AI was used in the creation of this PR (for any part, including but not limited to coding, reverse engineering, or debugging). I have read AI Contributions Policy. All comments and documentation are human-authored.
  • Generative AI was not used in the creation of this PR.

Tatsh added 2 commits June 27, 2026 13:29
Only known issue is that backface culling is not properly implemented so I am placing this under
Experimental until that is resolved.
Signed-off-by: Andrew Udvare <audvare@gmail.com>
@magcius

magcius commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Why are both boxes ticked in the above form?

@magcius magcius left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If generative AI was used in the creation of this PR, please review this project's AI policy and make sure that all comments and documentation are human-authored. Any future submissions that violate AI policy will be instantly rejected.

Comment thread src/Incoming/Scenes.ts


const SPRITE_ATLAS_SIZE = 256;
const IDENTITY_MATRIX = mat4.create();

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mat4Identity

Comment thread src/Incoming/Scenes.ts
const pathBase = "Incoming";
const subversionBase = "IncomingSubversion";
const SUBVERSION_OVERRIDES = new Set<string>(subversionOverridePaths);
let overrideSet = new Set<string>();

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No stateful globals please.

Comment thread src/Incoming/Scenes.ts
const SHADOW_LIFT = 4;
const pathBase = "Incoming";
const subversionBase = "IncomingSubversion";
const SUBVERSION_OVERRIDES = new Set<string>(subversionOverridePaths);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might prefer this in data rather than in the source tree.

Comment thread src/Incoming/IAN.ts
// then 3 face-vertex slots of 8 bytes each = { u16 vertexIndex; u8[6] aux }.
import ArrayBufferSlice from "../ArrayBufferSlice.js";

/**The size in bytes of the {@link IANModel} header (`RawModelGeometry`). */

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of unhelpful doc-comments that might have been AI-generated. Please remove them; this one just repeats info that's already found in the much-more helpful header comment.

Comment thread src/Incoming/IAN.ts
readonly name: string;
/** Interleaved vertex data, 8 float32 per vertex: posX, posY, posZ, normX, normY, normZ, u, v. */
readonly vertices: Float32Array;
/** Number of vertices in {@link vertices}. */

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no shit (but also why do you need this instead of calculating it from the vertex data?)

Comment thread src/Incoming/IAN.ts
readonly vertexCount: number;
/** Triangle index list (3 indices per triangle) referencing {@link vertices}. */
readonly indices: Uint32Array;
/** Per-triangle flags (one entry per triangle); bit {@link IAN_FACE_FLAG_TWO_SIDED} = two-sided. */

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used at all? I don't see where it's used in the renderer.

Comment thread src/Incoming/IAN.ts
}

function readNodeName(view: DataView, faceDataOffset: number): string {
// Iterate from end to find the start of the string.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readString?

Comment thread src/Incoming/MDL.ts
export interface IncomingMDLRef {
/** The referenced object's `label`, resolved against the level's WDL + MDL placements. */
readonly label: string;
/**

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment is more unhelpful than not having it, I think

Comment thread src/Incoming/Terrain.ts
const nx = hR - hL;
const ny = -2 * TERRAIN_CELL_SPACING; // Incoming up is -Y, so negate to get the +Y-up normal.
const nz = hU - hD;
const len = Math.hypot(nx, ny, nz) || 1;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vec3?

Comment thread src/Incoming/Terrain.ts
const v10 = base + (li + 1) * row + lj;
const v01 = base + li * row + (lj + 1);
const v11 = base + (li + 1) * row + (lj + 1);
// Winding: top (up, Incoming −Y) faces are the FRONT so back-face culling drop

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this reads like an AI-generated comment. You can also set the winding mode in the renderer with the frontFace mega state flag...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants