# Classic CSS map imports

The added courses are the actual **surf_utopia_njv** by **Panzer** and **surf_mesa_fixed** by **Arblarg**. KSF lists both as tier-one linear CSS courses with three checkpoints. Utopia was added in 2012 and Mesa in 2014. These are the CSS versions, not similarly named CS:GO, CS2, or TF2 ports. [KSF Utopia](https://ksf.surf/maps/surf_utopia_njv?game=66t&mode=fw), [KSF Mesa](https://ksf.surf/maps/surf_mesa_fixed?game=66t&mode=fw).

## Provenance and reproducibility

The public [KSF/OuiSURF mirror index](https://main.fastdl.me/maps_ksfthings.html) identifies the exact files. [OuiSURF's collection](https://github.com/OuiSURF/Surf_Maps) describes its collection as maps from KSF CSS servers. A matching filename alone is not proof of the exact live server revision; the independently recorded movement comparisons provide a second check.

| Map | SHA-1 of decompressed BSP | Bytes | VBSP / revision |
|---|---|---:|---|
| [Utopia download](https://main.fastdl.me/h2/50b99557a4b754696ce16e9e920cb1b6072dd4bd/surf_utopia_njv.bsp.bz2) | `50b99557a4b754696ce16e9e920cb1b6072dd4bd` | 56,273,716 | 20 / 3009 |
| [Mesa download](https://main.fastdl.me/h2/f4897c2472b32b33bc22b072ffafef5caa0de8fb/surf_mesa_fixed.bsp.bz2) | `f4897c2472b32b33bc22b072ffafef5caa0de8fb` | 62,212,961 | 20 / 90 |

The offline converters are independently authored from published BSP, VPK, MDL/VVD/VTX, VTF, and PHY layouts. They preserve the original map authorship. The map downloads do not establish a general redistribution license, and no such license is claimed here. Imported art remains the property of its respective authors. The requested local imports also read a small number of stock materials/models from the user's installed Counter-Strike: Source archives; installed game files are never changed. Each export records these fallback resource paths in `localGameResources`.

With Python and Pillow installed, decompress the pinned downloads and run from the project directory (replace paths with the local BSP and CSS installation):

```powershell
python scripts/import_classic_maps.py utopia C:/maps/surf_utopia_njv.bsp --game-dir 'C:/Program Files (x86)/Steam/steamapps/common/Counter-Strike Source'
python scripts/import_boreas_visuals.py C:/maps/surf_utopia_njv.bsp --slug utopia --map-id surf_utopia_njv --author Panzer --game-dir 'C:/Program Files (x86)/Steam/steamapps/common/Counter-Strike Source'
python scripts/import_classic_maps.py mesa C:/maps/surf_mesa_fixed.bsp --game-dir 'C:/Program Files (x86)/Steam/steamapps/common/Counter-Strike Source'
python scripts/import_boreas_visuals.py C:/maps/surf_mesa_fixed.bsp --slug mesa --map-id surf_mesa_fixed --author Arblarg --game-dir 'C:/Program Files (x86)/Steam/steamapps/common/Counter-Strike Source'
npx tsx --test tests/classic-map.test.ts
```

Collision outputs are `public/maps/{utopia,mesa}-collision.json`; visual manifests are `public/maps/{utopia,mesa}-visuals.json` with textures and binary meshes in their respective subdirectories. The Boreas default importer profile and existing Boreas outputs remain unchanged.

## Geometry and route rules

All geometry stays in Source X/Y horizontal, Z up, feet-origin units. Renderer conversion remains separate. Convex BSP brush planes include compiled bevels; static solid props use their actual PHY convexes. Mesa displacements retain full-resolution triangles and honor the Source hull-exclusion/remove flags. Rendering uses the same BSP revision, including original textures, authored blends, baked lightmaps, static prop vertex lighting, and sky transforms.

| Imported content | Utopia | Mesa |
|---|---:|---:|
| Collision convexes | 3,633 | 5,002 |
| Displacement triangles | 0 | 183,040 |
| Static props rendered | 0 | 234 |
| Static props with PHY collision | 0 | 230 |
| Authored reset trigger models | 75 | 9 |
| Local ordered checkpoints | 3 | 3 |

Utopia's authored reset destination is `start`, feet origin `(-14096,0,12816)`, yaw 0. The supporting deck traces to `Z=12800.03125`, also the independent native record's standing height. Mesa's destination is `Spawn`, `(0,-800,10251)`, yaw 90; its deck traces to `Z=10144.03125`, also confirmed independently. Utopia has one additional teleport aimed at nonexistent `jail_top`; Valve's teleport implementation does nothing when a destination is missing, so it is recorded as metadata rather than an active reset.

There are no authored gravity or air-acceleration overrides in either BSP. Both maps use the established CSS 0.015-second simulation profile. Their independent KSF recordings show a **3500 u/s component limit**, exported as `physicsOverrides.maxVelocity=3500`. This is an inference from the records, not an authored BSP cvar or a claim about every historical KSF server. Horizontal speed can exceed 3500 when both horizontal components contribute.

Local start/checkpoint/finish boxes are defined in `scripts/import_classic_maps.py`, aligned to the actual route apertures and independent native bookmark positions. Their exact bounds are **not claimed to be KSF's server-side timing zones**, which are absent from BSP files. The first and third Utopia checkpoints and first two Mesa checkpoints are unions of mirrored boxes so both intended branches count without filling the empty space between them. PBs are local and versioned by map and physics configuration.

Mesa's authored continuous `trigger_push` is preserved: bounds `(-384,-4352,-12288)` to `(384,-3328,-11808)`, direction +Y, speed 3500, clients flag 1. The native run independently shows its displacement contribution without the same addition to stored velocity. See [MAP-PUSH.md](MAP-PUSH.md) for the Source base-velocity semantics and validation.

## Import checks and precise limits

`tests/classic-map.test.ts` checks pinned identity, native standing heights, finite/unit collision planes, convex bounds, mirrored checkpoint unions, local ordered timing crossings, the Mesa push, and existence of every visual resource. Its native-position timing test assesses zone placement only; **a sequence of injected positions does not prove surfability**. Separate complete command replay tests establish the playable routes. The native telemetry files include public source URL, hash, bookmarks, and the decoded tick samples. `scripts/decode-classic-replays.ts` reproduces decoding.

## Complete normal-command routes

Both imported courses have complete witnesses from a legal stationary start. The shipped Mesa route and a separately planned alternative both retain every authored reset volume. All runs use the normal default browser profile, including the documented 3500 component limit; no practice restores, position or velocity injection, noclip, altered geometry, or reset exemptions occur during these runs.

| Course / witness | Commands | Local time | Ordered events |
|---|---:|---:|---|
| Utopia, `public/replays/utopia-complete.json` | 3,867 | 53.349 s | Start, CP1, CP2, CP3, finish |
| Mesa, selected `fixtures/mesa-straight-complete.json` | 3,653 | 52.635 s | Start, CP1, CP2, CP3, finish |
| Mesa, alternative `fixtures/mesa-launch-cem-complete.json` | 3,598 | 51.810 s | Start, CP1, CP2, CP3, finish |

The release publisher copies the selected Mesa witness to `public/replays/mesa-complete.json`. `scripts/validate-classics.ts` reconstructs each initial state from a stationary start-deck spawn, accepts only normal command fields and magnitudes, then independently runs the entire course through `GameSession`. It requires all checkpoints in order, no falls or invalidation, and a finish event on the final command. Every tick's state, collision contacts, events, splits, and time agree exactly at 30, 60, 144, and 240 render FPS. The separate Mesa reports are `fixtures/mesa-straight-command-validation.json` and `fixtures/mesa-alternate-command-validation.json`; the release validation report identifies the canonical replay by SHA-256.

The offline planners select ordinary mouse angles and key presses. They can cache a prefix already produced by normal simulation while searching, but every completed witness is rerun from its original stationary start before acceptance. Utopia's line uses small view-angle corrections to clear its authored reset edges. The Mesa alternatives use different normal turns and descents, then surf the original lower ramps and pass through the original continuous push trigger. No such planner runs in the playable game. These witnesses establish whole-course playability and deterministic replay in this implementation; they do not establish exact parity with a private KSF server or make the local timer boundaries into KSF boundaries.

## Remaining native and entity differences

The following differences require explicit separation from verified movement:

- The native KSF recordings cross a few authored reset-volume edges without resetting. This occurs in both recent and older independent runs. Latest Utopia frames 797–801 overlap trigger models `*24`/`*86`; latest Mesa frames 401–402 overlap `*1`, 2520–2526 overlap `*1`/`*10`, and 2773–2775 overlap `*8`. Exact model ownership, transforms, solid contents, and entity flags were checked. The corresponding PHY model convex counts match the compiled brushes and their surfaces differ by roughly the ordinary half-unit inset. **A direct isolated CSS server test corroborated the imported reset shapes:** stock build 11003710 reset a crouched bot at the tested Utopia/Mesa positions and measured the same 0–45 crouched hull. See [NATIVE-CSS-PROBE.md](NATIVE-CSS-PROBE.md). The KSF server/revision difference remains unresolved. The browser retains the complete authored reset volumes and full player hull; completed normal-command witnesses are evaluated separately from KSF's recorded line.
- Mesa isolated native states 521–523 are about 0.05 units inside playerclip brush 2281 according to the downloaded compiled planes. Side 10 uses original plane 55800: normal `(0.7808678150,0.4417394698,0.4417144656)`, distance `5514.1142578125`. A one-step trace from that supplied state corrects by about 0.084 units. This is retained as a precision/revision gap; continuous traversal is a separate test.
- Four Mesa static prop instances lack a PHY resource even after mounting the installed game: two credits models and two crystal models. Their render meshes remain visible; no invented collision mesh is substituted.
- Mesa's four decorative crystal `func_tanktrain` brush models remain at their authored initial transforms. Full train animation and the late decorative dynamic blast door are not simulated. Soundscapes, particles, and multiplayer/gameplay entities are not recreated. The main surf route and completion point precede the blast door.
- Utopia uses half-height sky side images and a 1×1 bottom texture with authored VMT transforms. The renderer applies these transforms while preparing equally sized cube faces; direct upload as a conventional cubemap would be invalid.

Primary trigger references: [Valve CTriggerTeleport and CBaseTrigger](https://github.com/ValveSoftware/source-sdk-2013/blob/master/src/game/server/triggers.cpp), [Valve PhysicsTouchTriggers](https://github.com/ValveSoftware/source-sdk-2013/blob/master/src/game/server/baseentity.cpp), [Valve collision property](https://github.com/ValveSoftware/source-sdk-2013/blob/master/src/game/shared/collisionproperty.cpp). These shared SDK sources guide investigation; they do not prove CSS-specific engine internals or KSF's private server configuration.
