Skip to content

Commit f230565

Browse files
Revert "Fun Police" (#1294)
This reverts commit 3d1e2e1, restoring the optional presentation themes (Minecraft, CS:GO, GTA, Mario Kart, DOOM, Halo), their docs, assets and tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent f3c6f20 commit f230565

435 files changed

Lines changed: 29399 additions & 112 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/gta-heist.md‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# GTA V 3D presentation game
2+
3+
Select the GTA theme, then **Start heist**. The previous 2D Bay Area game
4+
has been removed. Its replacement is a browser-scale custom city sandbox,
5+
not the complete GTA V product or campaign.
6+
7+
## Playable city
8+
9+
The custom district has a connected street grid, buildings, a waterfront,
10+
park, decorative amusement pier, and street furniture. Four selectable GTA V
11+
cars (Adder, Buffalo, Blista, Taxi) share the roads with 18 traffic vehicles.
12+
The Michael model represents the player on foot and background pedestrians.
13+
The police model represents pursuers. Geometry and available textures are
14+
reused; missing shared texture dictionaries receive explicit material tints.
15+
The character export has no skeleton or animation clips. A custom runtime
16+
skin rig adds distance-driven walking and sprinting, knee bends and opposing
17+
arm swings. It settles when stopped, freezes when paused and gives background
18+
pedestrians independent strides. These are original procedural animations,
19+
not GTA V's animation clips.
20+
21+
Pick up four packages in order, then deliver at the garage. Stop within the
22+
gold ring and press E. Pickups and vehicle collisions raise a wanted level;
23+
stay at least 110 m from every pursuer for 15 seconds to escape. The garage
24+
repairs a stationary vehicle. A run ends on delivery, zero health, or eight
25+
minutes elapsed. Cash and progress are in-memory and reset on closing.
26+
27+
- WASD/arrows: drive or walk.
28+
- Space: brake; Shift: sprint on foot.
29+
- F: exit a stationary car or reenter within five metres.
30+
- E: collect/deliver; C: chase/close camera; P: pause; M: map.
31+
- Buttons: change a stationary car, day/night, sound, restart.
32+
- Touch: hold steering and pedals simultaneously; use the action buttons.
33+
- Blur, hidden tab and map opening pause the simulation. Escape closes the
34+
dialog and restores launcher focus.
35+
36+
## San Andreas flight
37+
38+
The flight button separately loads a low-detail San Andreas model containing
39+
the source terrain/building meshes and a Frogger helicopter model. This is an aerial explorer:
40+
W/S moves, A/D turns, Shift climbs and Space descends. Height is clamped above
41+
the terrain. It has no aircraft physics, on-ground missions, traffic, or
42+
interiors. Returning restores the paused custom-city run.
43+
44+
The source model is not a substitute for GTA V's full streamed world.
45+
The city sandbox's street layout, buildings, mission system and physics are
46+
custom work and are not extracted GTA V gameplay.
47+
48+
## Resource and SEO boundaries
49+
50+
The existing optional-theme lazy boundary is retained. The dialog, Three.js,
51+
game CSS and models are requested only after launch. Selecting GTA alone
52+
does not download the game models. The map is another on-demand download.
53+
Closing aborts fetches, removes input and resize handlers, disposes geometry,
54+
materials/textures and the WebGL context, and closes synthesized engine audio.
55+
No external requests, persistence, or telemetry of player movement is added.
56+
57+
No indexable page, metadata, canonical, hreflang, structured data, benchmark
58+
filter, numerical transformation, or API is changed. This is the documented
59+
presentation-only exclusion from API and `inferencex-skills` coverage.
60+
61+
## Implementation
62+
63+
- `gta-world.ts`: city geometry and street/traffic paths.
64+
- `gta-engine.ts`: deterministic simulation, missions and state transitions.
65+
- `gta-renderer.ts`: asset loading, instanced scenery and disposal.
66+
- `gta-game.tsx`: bilingual controls, accessibility and lifecycle.
67+
- `gta-engine.test.ts`: driving, collision, missions, pause, flight and reset-state tests.
68+
- `cypress/component/gta-heist.cy.tsx`: integrated controls and Chinese UI.
69+
- Existing optional-theme isolation and sanity specs remain the integration guards.
70+
71+
Asset provenance, processing and permission limitations are recorded in
72+
`packages/app/public/decorative/gta/models/README.md`.

‎docs/images/csgo-chart.webp‎

74.2 KB
Loading

‎docs/images/csgo-desktop.webp‎

118 KB
Loading

‎docs/images/csgo-mobile.webp‎

36.7 KB
Loading

‎docs/index.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Design rationale and non-obvious conventions. See [CLAUDE.md](../CLAUDE.md) for
44

55
## Docs
66

7-
- [Presentation Themes](./themes.md): light/dark persistence, retired-theme reset, icon-only theme picker, and presentation-only API exclusion.
7+
- [Presentation Themes](./themes.md): Minecraft activation and assets, CS:GO, GTA and Halo styling, Halo theme music, icon-only theme picker, dark-chart/export integration, and presentation-only API exclusion.
8+
- [Playable Minecraft](./minecraft-game.md): the opt-in game launched from the Minecraft theme, controls, saves, lifecycle and verification.
89

910
- [Dashboard Read-only Views](./dashboard-readonly-views.md): API/filter inventory, source audit and verification scope
1011
- [Pareto Boundary API](./pareto-api.md): Query frontier and hinterland observations, preserve provenance, and distinguish API scope from chart highlights.

‎docs/mario-kart.md‎

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Mario Kart theme and 3D race
2+
3+
Select **Mario Kart** (the flag icon) in the theme picker, then **Race in 3D**.
4+
The theme uses a local rendered Luigi Circuit backdrop and the existing dark
5+
chart palettes. The game is imported only after pressing its launcher.
6+
7+
## Play
8+
9+
Pick one of eight racers (Mario, Luigi, Peach, Daisy, Yoshi, Toad, Donkey Kong,
10+
Bowser) and an engine class (50cc, 100cc, 150cc), then race three laps of Luigi
11+
Circuit against the other seven. Light racers accelerate and drift harder,
12+
heavy racers have the highest top speed and win collisions.
13+
14+
There is no assisted steering. The kart goes where it points: holding
15+
accelerate alone drives straight into the first wall. Collision, walls, curbs,
16+
offroad, sand, and water come from a surface map rasterized from the course's
17+
own collision materials, so cutting across grass is slower and falling into
18+
the water brings out Lakitu to put you back on the road.
19+
20+
| Control | Action |
21+
| -------------------------- | -------------------------------------------------------- |
22+
| W / ↑ | Accelerate |
23+
| S / ↓ | Brake, then reverse |
24+
| A D / ← → | Steer |
25+
| Space (or X) | Hop; hold while steering to drift |
26+
| Shift / E | Use item. Hold to drag bananas or shells behind the kart |
27+
| S while releasing the item | Throw shells and Bob-ombs backward |
28+
| C | Look back |
29+
| P | Pause |
30+
31+
Drifting charges blue then orange sparks; releasing gives a mini-turbo or super
32+
mini-turbo. Pressing accelerate just after the 2 in the countdown gives a rocket
33+
start; pressing too early burns out. Following close behind another racer
34+
builds a slipstream.
35+
36+
The nine boost panels on the final banked bend give a one-second boost on
37+
contact. Banking is drivable terrain, not a vertical barrier. Drift steering
38+
uses speed-dependent handling so ordinary bends allow natural blue/orange
39+
charge; a low-speed hop held through acceleration can also enter a drift.
40+
41+
Item boxes sit in three rows around the course. The roulette lands on an item
42+
weighted by position, as in the original: front runners mostly see bananas and
43+
green shells, back markers see stars, triple mushrooms, Golden Mushrooms, and
44+
lightning. Items: Mushroom, Triple Mushroom, Golden Mushroom, Banana, Triple
45+
Banana, Green Shell, Triple Green Shells, Red Shell (homes on the racer ahead),
46+
Star, Bob-omb, and Lightning (shrinks every rival and takes their items).
47+
CPU racers use the same controls and items, drift for mini-turbos, avoid
48+
hazards, back out after hitting walls, and use mild rubber-banding.
49+
50+
The HUD shows position, lap, race time, the item slot and roulette, live
51+
standings with racer icons, a course minimap with racers, boxes, and
52+
projectiles, speed, drift spark stage, and final lap and wrong way banners.
53+
Lakitu runs the start lights, shows the reverse sign, and waves the finish
54+
flag. The results card lists every racer's time (projected for racers still
55+
on course) and your lap splits.
56+
57+
P pauses from the driving canvas. Window blur and hidden tabs pause the
58+
simulation. Touch controls (←, →, Drift, Item, Brake, Accelerate) support
59+
simultaneous presses. Escape closes the dialog and returns focus to the
60+
launcher. Sound is synthesized with WebAudio after Start; Mute toggles it.
61+
62+
## Assets and scope
63+
64+
The track, all eight racers, the Standard Kart, items, item boxes, and Lakitu
65+
use actual Mario Kart Wii model/texture assets, converted for WebGL. See the [asset provenance and reported permission](../packages/app/public/decorative/kart/README.md).
66+
This is an original arcade simulation using those assets, not a port of Mario
67+
Kart Wii. There is no Nintendo game code, audio, multiplayer, or leaderboard.
68+
69+
Both English and Chinese UI use the same implementation. Embedded charts
70+
suppress the theme artwork and launcher. Other themes request no kart assets.
71+
Closing the game disposes its GPU resources and listeners, and aborts pending
72+
asset downloads. WebGL/asset failures offer Retry; retry creates a new canvas.
73+
Reduced-motion settings disable camera easing, shake, particles, and boost FOV changes.
74+
75+
## Data/API coverage exclusion
76+
77+
This is an optional presentation theme and game, with no new route or data
78+
view. It changes no benchmark filters, model selection, metrics, calculations,
79+
share parameters, or returned data. It therefore uses the presentation-only
80+
exclusion from API and `@semianalysisai/inferencex-skills` parity. Official
81+
and unofficial overlays retain the same dark palette and data semantics.
82+
83+
## Verification
84+
85+
- Engine tests (on the real surface map): countdown, throttle-only does not
86+
finish, a steering driver finishes, all CPU racers finish, steering, offroad,
87+
braking/reverse, drift stages and mini-turbo, rocket start and burnout, item
88+
boxes and roulette, mushroom, banana, green and red shells, star, lightning,
89+
Golden Mushroom, pause, and standings.
90+
- Theme tests: picker registry, shared chart classification/palette, lazy
91+
decoration activation, cleanup, and embed suppression.
92+
- `cypress/e2e/kart-mode.cy.ts`: actual theme selection, asset isolation,
93+
on-demand launch, Escape/focus restoration, persistence, and Chinese mobile UI.
94+
- Development builds expose `render_game_to_text()`, `advanceTime(ms)`, and `kart_race()`.
95+
The latter switches off the wall-clock simulation to avoid double stepping.
96+
Production builds do not expose those hooks.

‎docs/minecraft-game.md‎

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Playable Minecraft
2+
3+
Select **Minecraft** in the theme picker, then **Play Minecraft** in the banner
4+
under the header. The game opens in a dialog and is imported only after the
5+
button is pressed; the dashboard, charts and data are unchanged.
6+
7+
## What is in the game
8+
9+
- Title screen with the rotating vanilla panorama, splash text, Singleplayer,
10+
Options and Quit. Singleplayer lists saved worlds (play, delete, create).
11+
- Create New World: name, seed (text seeds are hashed like vanilla), Survival or
12+
Creative, and Peaceful/Easy/Normal/Hard difficulty.
13+
- Infinite, seeded terrain in 16×16×128 chunks streamed around the player:
14+
plains, forest, birch forest, taiga, snowy, desert, mountains, ocean, beach
15+
and river biomes, caves, coal/iron/gold/redstone/lapis/diamond ores in
16+
depth bands, deepslate, bedrock, oak/birch/spruce trees, cacti, sugar cane,
17+
flowers, grass and lakes. The same seed always produces the same world.
18+
- 85 blocks and 149 items with the vanilla textures, 74 crafting recipes
19+
(2×2 inventory grid and 3×3 crafting table, shaped and shapeless, tag
20+
ingredients such as any planks) and 20 furnace recipes with fuel burn times.
21+
- Survival rules: vanilla mining times by hardness, tool kind and tier,
22+
harvest gating (stone needs a pickaxe, iron ore a stone pickaxe, diamond an
23+
iron pickaxe), tool durability, item drops and pickup, health, hunger,
24+
saturation and eating, fall, drowning, lava, fire, cactus and mob damage,
25+
death screen and respawn, and experience levels.
26+
- Creative: instant breaking, flight (double-tap Space), the creative item
27+
grid with search, and middle-click pick block.
28+
- Sky and sky-light and block-light (torches, glowstone, lava, furnaces)
29+
with smooth lighting and ambient occlusion, day/night cycle with sun, moon,
30+
stars and moving clouds, fog, flowing water and lava with source blocks,
31+
water + lava making obsidian/cobblestone, falling sand and gravel, crop
32+
growth, saplings growing into trees, TNT, doors, ladders, chests and furnaces.
33+
- Mobs with vanilla models and skins: zombies, skeletons (arrows) and creepers
34+
(explosions) spawn in the dark on Easy and above; pigs, cows, sheep (shearing
35+
and wool) and chickens spawn with the terrain and drop food.
36+
- HUD: hotbar, hearts, hunger, air bubbles, experience bar and level, held item
37+
name, chat, F3 debug screen, F1 hide HUD, F5 first-person/back/front camera
38+
with the player model.
39+
- Inventory, crafting table, furnace, chest and creative screens with vanilla
40+
slot behavior: left/right click, shift-click transfer, drag to split evenly
41+
or place one each, double-click collect, number keys to swap with the hotbar,
42+
Q to drop, and tooltips.
43+
- Chat commands: `/gamemode`, `/time`, `/tp`, `/give`, `/summon`, `/kill`,
44+
`/difficulty`, `/seed`, `/spawnpoint`, `/clear`, `/help`.
45+
- Options: FOV, render distance, mouse sensitivity, GUI scale, brightness,
46+
volume, view bobbing and clouds. Settings persist in
47+
`localStorage` (`inferencex-minecraft-options`).
48+
- Sounds from the vanilla asset index for digging, steps, mobs, explosions,
49+
doors, chests and UI clicks, gated by the theme's existing sound toggle.
50+
51+
## Controls
52+
53+
| Input | Action |
54+
| ----------------------- | ------------------------------------------------ |
55+
| Click the world | Capture the mouse |
56+
| Mouse | Look |
57+
| W A S D | Move |
58+
| Space | Jump; swim up; double-tap to fly in Creative |
59+
| Shift | Sneak; fly down |
60+
| R, Ctrl or double-tap W | Sprint |
61+
| Left click (hold) | Mine or attack |
62+
| Right click | Place, use, eat, open containers |
63+
| Middle click | Pick block |
64+
| 1-9 or wheel | Select hotbar slot |
65+
| E | Inventory |
66+
| Q | Drop item (Ctrl+Q drops the stack) |
67+
| T or / | Chat and commands |
68+
| F1 / F3 / F5 (or V) | Hide HUD / debug screen / camera |
69+
| Escape | Close a screen, pause; on the title screen, exit |
70+
71+
Touch devices get a movement stick (push fully forward to sprint), a look area
72+
(drag to look, tap to place or use, hold to mine or attack), Jump and Sneak
73+
buttons, a tappable hotbar, and on-screen menu buttons.
74+
75+
## Lifecycle
76+
77+
- `MinecraftPlayBanner` (in `minecraft-theme.tsx`) renders the launcher and
78+
dynamically imports `components/minecraft/game/minecraft-game-dialog.tsx`.
79+
The game code, CSS, textures, models and sounds are not requested until the
80+
button is pressed. Light, dark and the other themes request none of it.
81+
- Worlds save to `localStorage` every 30 seconds, on pause, on Save and Quit,
82+
and when the dialog closes: the index is `inferencex-minecraft-worlds` and each
83+
world is `inferencex-minecraft-world-<id>`. Only edited blocks are stored
84+
(terrain regenerates from the seed), plus player state, inventory, entities,
85+
chests and furnaces. A full or disabled storage shows a chat warning.
86+
- Escape is routed through the game first: it closes open screens and toggles
87+
the pause menu while playing, and closes the dialog only from the title
88+
screen. Focus returns to the launcher. Closing stops the render loop, releases
89+
the pointer lock, disposes WebGL resources and removes listeners.
90+
- The world renders with three.js using a single texture atlas, per-chunk
91+
meshes with cutout and translucent passes, and a fixed 20 Hz simulation tick
92+
with render interpolation.
93+
- Embedded views hide the launcher, as with the other theme banners.
94+
95+
## Source layout
96+
97+
`packages/app/src/components/minecraft/game/`:
98+
99+
| File | Responsibility |
100+
| -------------------- | ------------------------------------------------------------------ |
101+
| `mc-blocks.ts` | Block registry: textures, hardness, tools, light, shapes, sounds |
102+
| `mc-items.ts` | Items, tools, food, fuel, recipes, smelting and mining time |
103+
| `mc-noise.ts` | Seed hashing, PRNG and simplex noise |
104+
| `mc-world.ts` | Terrain generation, chunks, lighting and fluids |
105+
| `mc-physics.ts` | AABB collision, movement, raycasts |
106+
| `mc-game.ts` | Game rules, player, mobs, containers, commands, ticks |
107+
| `mc-mesher.ts` | Chunk meshing with smooth light and ambient occlusion |
108+
| `mc-models.ts` | Vanilla entity box models and poses |
109+
| `mc-renderer.ts` | three.js scene, sky, particles, entities, first/third person views |
110+
| `mc-audio.ts` | Sound playback |
111+
| `mc-save.ts` | World serialization and `localStorage` |
112+
| `mc-ui.tsx` | HUD, screens, item icons, buttons, sliders, panorama |
113+
| `minecraft-game.tsx` | Phases, menus, input, loop and overlays |
114+
| `mc-atlas.ts` | Generated atlas, icon and sound tables |
115+
116+
`packages/app/scripts/build-minecraft-game-assets.py` rebuilds the atlases, GUI
117+
textures, panorama and sounds from a client jar, a 1.20.1 jar (classic entity
118+
skin layouts) and the launcher asset index. See
119+
`packages/app/public/decorative/minecraft/game/README.md` for provenance.
120+
121+
## Data/API coverage exclusion
122+
123+
This is an optional presentation feature with no new route or data view. It
124+
changes no benchmark filters, model selection, metrics, calculations, share
125+
parameters, or returned data. It therefore uses the presentation-only
126+
exclusion from API and `@semianalysisai/inferencex-skills` parity.
127+
128+
## Verification
129+
130+
- `mc-game.test.ts`: deterministic generation, bedrock and ores, lighting,
131+
crafting (shaped, shifted, shapeless, 3×3 only), smelting, vanilla mining
132+
times and harvest tiers, gravity and collision, raycasts, drops and pickup,
133+
placement, inventory clicks and drag distribution, furnace smelting, fluids
134+
and obsidian/cobblestone, fall damage, death and respawn, commands, mob
135+
determinism and save round trips.
136+
- `cypress/e2e/minecraft-game.cy.ts`: asset isolation on light and dark, launch
137+
from the theme, world creation, Escape to pause, Save and Quit, Escape closing
138+
the dialog with focus restored, and the Chinese mobile launcher.
139+
- Development builds expose `render_game_to_text()` and `mc_debug()`; production
140+
builds do not.

0 commit comments

Comments
 (0)