Engineering Breakdown of a 1.4MB Single-File 3D FPS Demo

    This article breaks down how a single HTML file of roughly 1.4MB can deliver a playable first-person shooter with lighting, materials, and a complete level. It covers the asset budget behind single-file delivery, procedural generation of textures, meshes, and audio via deterministic PRNGs and noise shaders, visual density tactics with performance tiering, and the long-chain agent loop used to build it. It closes with a practical methodology for turning the demo into repeatable team capacity.

    Engineering Breakdown of a 1.4MB Single-File 3D FPS Demo

    1. The Starting Point: Tiny File Size, High Visual Fidelity

    A recent phenomenon has generated heavy discussion in technical communities: a web file of only about 1.4MB that, once opened, delivers a first-person shooter with lighting, materials, and a complete level structure. Its smoothness and visual completeness far exceed what most people expect from a “browser mini-game.” For comparison, a casual phone photo is often 7MB to 10MB, while a traditional client-side shooter needs an installer of several gigabytes.

    One common misreading needs clearing up first: this kind of demo is not the output of any single country’s team. The Chinese version circulating in communities is only a localized interface plus a product of secondary sharing. The original author is an individual engineer publishing a capability check, and it does not represent the official position of any organization. Treating it as a “product comparison between one country’s company and another’s” misses the real technical value.

    Three questions are what developers should actually care about:

    1. How is the 1.4MB budget allocated;
    2. Why high-fidelity visuals can hold up at such a tiny size;
    3. Where the cost and engineering boundaries lie for long-chain automated construction driven by a large model.

    2. Where the Size Goes: Asset Budgeting for Single-File Delivery

    A traditional 3D project’s size is roughly composed of: textures and normal data taking the largest share, followed by audio, model meshes, and animation curves, with only a few hundred KB of code at the end. The core idea of the single-file approach is to replace “stored assets” with “runtime-generated assets.”

    A reference budget breakdown:

    Component Traditional approach Single-file approach
    Textures Hundreds of MB (bitmaps) 0 (synthesized in real time by noise functions)
    Meshes Tens of MB 0 (procedurally assembled from primitives)
    Audio Tens of MB 0 (synthesized in real time by oscillators)
    Level data Several MB A few KB (seed + rules)
    Code Hundreds of KB Hundreds of KB to 1MB

    The key is replacing asset files with a deterministic pseudo-random number generator (PRNG). The same seed reproduces the same map and the same set of materials on any device:

    1. // Deterministic randomness: the seed decides everything, no assets stored
    2. function mulberry32(seed) {
    3. return function () {
    4. seed |= 0; seed = (seed + 0x6D2B79F5) | 0;
    5. let t = Math.imul(seed ^ (seed >>> 15), 1 | seed);
    6. t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
    7. return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
    8. };
    9. }
    10. const rand = mulberry32(20261110);

    Materials follow the same route, synthesized from layered noise in the fragment shader instead of sampling bitmaps:

    1. // Texture-free material: multiple noise layers build rock/metal surfaces
    2. float n = fbm(vUv * 8.0, 5); // 5 octaves
    3. vec3 albedo = mix(ROCK_LOW, ROCK_HIGH, n);
    4. float rough = mix(0.85, 0.35, smoothstep(0.4, 0.8, n));

    Audio takes the same path: gunshots, footsteps, and ambient noise are synthesized in real time with Web Audio oscillators and noise buffers, eliminating all sample files.

    3. Where the Visuals Come From: A “Visual Density” Strategy for Small Scenes

    One line from the original prompt is quoted repeatedly: make the scale small, but make every other dimension impressive. This is not a compromise but concentrating a limited budget on the areas with the highest visual density.

    It breaks down into four engineering rules:

    • Single level, short flow: one compact scene beats ten empty ones, keeping player attention on high-density detail.
    • Lighting is the best value investment: one directional light with real-time shadows, plus screen-space ambient occlusion, is enough to establish volume; this is far more effective than piling on texture resolution.
    • Geometry reuse and instancing: barrels, crates, and pipes recur, and instanced drawing pushes draw calls extremely low.
    • Post-processing sets the tone: tone mapping, light bloom, film grain, and vignetting are the main sources of the “AAA feel,” at a cost of only a few fullscreen passes.

    Performance tiering is also mandatory, otherwise low-end and mid-range devices and portrait-mode phones will simply freeze:

    1. const TIERS = [
    2. { name: 'high', shadowMap: 2048, fbmOctaves: 5, post: ['bloom','grain'] },
    3. { name: 'mid', shadowMap: 1024, fbmOctaves: 4, post: ['grain'] },
    4. { name: 'low', shadowMap: 512, fbmOctaves: 3, post: [] },
    5. ];
    6. const tier = TIERS.find(t => deviceMemory >= 8 ? t.name === 'high' : false) ?? TIERS[2];

    4. Where the Build Process Comes From: Long-Chain Automation and Human-Machine Division of Labor

    The most counterintuitive point about this kind of project is how short the prompt is—essentially just a few lines: make a first-person shooter with AAA-level visuals, at the scale of a mini level. Based on this, the author concluded that the era of prompt engineering is basically over. A more accurate statement is: the focus of prompt engineering has shifted from “wording technique” to “specification constraints and acceptance criteria.”

    A usable specification prompt should contain five elements: delivery format, visual target, scale boundary, technical constraints, and acceptance criteria.

    1. Delivery format: a single HTML file, runs on double-click, no external requests
    2. Visual target: physically based lighting + real-time shadows + tone mapping, AAA-level look
    3. Scale boundary: one compact level, 3-5 minute flow
    4. Technical constraints: all assets procedurally generated at runtime; usable in mobile portrait; frame rate first
    5. Acceptance criteria: 60fps on desktop, 30fps+ on mid-range phones, no console errors

    From an engineering perspective, this build process is essentially a long-chain agent loop: the model autonomously iterates through planning, coding, running, reading errors, and fixing them. The cumulative output and input tokens reach the scale of millions and hundreds of millions respectively, the elapsed time is measured in hours, and the equivalent API cost is around several hundred dollars. When assessing cost-effectiveness, it should be placed on the same table as human labor: at an estimated daily rate of two hundred dollars for a skilled developer, one week of output already exceeds that order of magnitude, and this excludes the hidden costs of art asset procurement and cross-device adaptation.

    What must stay clear-headed about is that this kind of demo’s “playable depth, content volume, and long-term maintainability” remain significantly below formal commercial works. What it proves is an order-of-magnitude leap in prototype construction efficiency, not that the production pipeline can be replaced as a whole.

    5. An Actionable Methodology: Turning the Demo into Team Capacity

    To reuse this approach in your own project, proceed in this order:

    1. Set the size and frame-rate red lines first, then talk about visuals, to avoid late-stage rework;
    2. Build a procedural asset library: noise materials, modular geometry, synthesized sound effects, a one-time investment with long-term reuse;
    3. Write acceptance criteria as executable checks: zero console errors, tiered frame-rate thresholds, a loading size cap;
    4. Make the human-machine division explicit: the model handles scaffolding and repetitive implementation, humans handle level pacing, feel tuning, and architecture decisions;
    5. Add supporting engineering infrastructure: use object storage to distribute build artifacts, use logging services and monitoring alerts to collect real-device frame rates and exceptions, and use a container platform to lock in a reproducible build environment.

    On the compute and model side, choosing general-purpose cloud inference resources with elastic scaling and fine-grained billing, together with a message queue for long-task queuing, lets these hour-scale build tasks run in parallel at a controllable cost. The general cloud infrastructure categories offered by Baidu AI Cloud (container platform, object storage, logging service, monitoring alerts, and so on) can carry the above chain without relying on any proprietary interface.

    6. Conclusion

    The real lesson of the 1.4MB shooter demo is not “who is stronger,” but three transferable engineering conclusions: asset proceduralization is the fundamental means of size compression; visual density takes priority over scene scale; the clarity of specifications and acceptance criteria determines the ceiling of automated construction. Folding these three points into your team’s pre-research process is the most practical return this discussion offers developers.