Vibe Coding Pushes the Limit: A Complete 3D Sonar FPS Squeezed into 16 KB

A developer used AI-assisted coding to fit a sonar-themed FPS into 16KB, testing Vibe Coding's low-level optimization limits.
The article covers Blind Sector, a complete 16KB FPS built via Vibe Coding, with Fable 5 for planning and Opus 5.5 for implementation. Set in underground darkness, players use three-frequency sonar pulses that briefly light up the environment but also expose their position — a double-edged mechanic. Technically it uses 2D DDA raycasting, zero-uniform single draw calls, SDF enemies, Crinkler 300MB hash-table compression, and LCG procedural music. The experiment shows AI can handle difficult system-level optimization, but human direction, aesthetics, and architecture remain irreplaceable.
How a Complete 16 KB FPS Game Was Born
A developer on Reddit shared an unusual experiment: using Vibe Coding (AI-assisted coding) to build something that normally demands deep demoscene expertise — a complete first-person shooter in just 16 KB.
The author's motivation was straightforward: to test how far AI-assisted coding could push a field that relies heavily on low-level tricks and manual optimization. He used different AI models for different stages — Fable 5 High for initial planning, Opus 5.5 High for implementation, polishing, and optimization. The final product, called Blind Sector, has been open-sourced on GitHub. This experiment offers an interesting data point on the limits of Vibe Coding: AI can do more than write business logic — it can also assist with challenging system-level optimization tasks under extreme constraints.

Demoscene is a subculture that originated in 1980s Western Europe, where participants (called demosceners) create real-time audiovisual demos under extremely strict size limits (common categories include 4KB, 16KB, and 64KB). These programs typically use no external resource files — all graphics, music, and textures must be generated procedurally by code at runtime, making them heavily dependent on assembly language, linker tricks, and compression algorithms. A 16KB executable that can contain a complete 3D game means its information density far exceeds that of ordinary software. Demoscene values differ sharply from commercial software: the smaller the size and the more stunning the effect, the higher the praise. This tradition of "constraints sparking creativity" is the key context for understanding the value of this experiment.
Core Gameplay: Hunt by Sound, and Be Hunted by Sound
The game is set underground, and the player is blind. Your only sensory tool is a sonar scanner that can emit pulses at three frequencies.
Each pulse briefly illuminates walls and enemies, after which the map quickly fades back into a blurry afterimage. This mechanic forces players to grope forward in the dark, building spatial memory from fleeting visual feedback.
An even more oppressive design choice: every pulse is itself noise, and everything underground hunts by sound. This means every attempt to gather information exposes your position. This mechanic binds "detection" and "risk" together, creating a natural cycle of tension.
(The dual-edged mechanic where "the pulse both illuminates and exposes" is one of the most discussed design highlights of this demo.)
Technical Optimization: Engineering Art Under Extreme Constraints
Under a 16 KB limit, every byte is precious. The author shared a series of astonishing optimization techniques, demonstrating how AI can assist with low-level tricks that normally belong to the domain of hardcore manual craftsmanship.
Raycasting and Shadows
The level is a 64×64 grid, raycast in the fragment shader using a 2D DDA algorithm. This design freed up about 430 bytes, a budget that was then used to implement pulse shadows, fake ambient occlusion (fake AO), and procedural wall textures.
A signed distance field (SDF) is a method of describing an object's surface with a mathematical function: for any point in space, the SDF returns the shortest distance from that point to the object's surface — positive means outside, negative means inside, and zero means exactly on the surface. Compared to storing vertices and triangles, an SDF can define geometry with just a few parameters (such as center and radius), and naturally supports smooth unions, intersections, and other boolean operations, making it ideal for procedural generation and minimal storage. Sphere tracing is a rendering algorithm based on SDFs: starting from the camera, the ray advances along its direction, and at each step it asks how far the current point is from the nearest surface, then safely advances that distance, iterating until it hits a surface. It doesn't need the depth buffer of traditional rasterization and can be done entirely in the fragment shader, which is why it's widely used in demoscene and shader art.
Single Draw Call, Zero Uniforms
Each frame, the CPU rewrites a float texture (64×90 RGBA32F) containing cell data, enemy lists, pulse states, lights, HUD text, and even font bit information. The camera's yaw, pitch, and aspect ratio are passed in via the texture coordinates of a single glRects. Zero uniforms, zero matrices, one draw call — this is demoscene-level minimalism at its finest.
Signed Distance Field Enemies
Enemies are built from signed distance fields (SDFs), assembled from rounded boxes and "limb" segments (7 bytes per part), rendered via smooth unions and sphere tracing. Crawlers have six articulated legs and actually walk. To solve the problem of slow close-up rendering, each part is given a bounding sphere so the shader can skip unnecessary calculations.
Compiler-Level Optimization
The author employed a series of unconventional techniques: using x87 instead of SSE2, stdcall instead of cdecl, disabling inlining, and replacing the 100 MB version with a 300 MB Crinkler hash table. These choices favor compressing the final size over runtime speed, reflecting the trade-offs under extreme space constraints.
Crinkler is a compression linker designed specifically for Windows executables, commonly used in 4KB and 64KB demoscene productions. Its core difference from ordinary compression tools is that it doesn't just compress data — it also compresses the PE header, import table, relocation information, and all other structures, and lets the decompression code share the same memory space as the compressed data, pushing the final size to its theoretical limit. Crinkler uses context-based arithmetic coding, and its compression ratio correlates with the hash table size used: a 300MB hash table can find more repeated patterns than a 100MB version, at the cost of significantly higher memory usage and linking time. This is a typical trade-off where the author sacrifices build speed for size.
Procedurally Generated Music
The music is also generative. Each bar uses a tiny linear congruential generator (LCG) to select chords from a natural-scale harmonic progression, and then the pad, bass, and arpeggio are played through the same synthesizer used for sound effects.
A linear congruential generator (LCG) is the simplest class of pseudorandom number algorithms, iteratively producing a seemingly random sequence through the formula x_{n+1} = (a·x_n + c) mod m, where a, c, and m are preset constants. Its advantage is that it requires only a few lines of code and a few bytes of constants, making it ideal for size-constrained procedural generation; its drawback is lower randomness quality and a limited period. Here, the LCG is used as the harmonic "decision-maker" for the music: each bar pseudorandomly picks a progression from the available chords of a natural scale (such as the C major scale), then drives the pad, bass, and arpeggio parts, giving the music both random variation and tonal consistency without storing any audio sample data.
Exploring the Boundaries of Vibe Coding and Its Implications
The value of this experiment isn't just that it produced a game — it's also a probe into the scope of Vibe Coding's applicability.
Normally, controlling a 16 KB program size falls within the demoscene domain, requiring years of accumulated knowledge of assembly, linkers, and compression algorithms. The author himself noted that such tasks "usually require deep demoscene knowledge." This time, however, he completed the entire process from planning to optimization with the help of AI.
This raises a question worth pondering: When AI can assist with or even lead extreme low-level optimization work, what is the human developer's core competitiveness?
One possible answer: taste and judgment. The author needed to understand the design logic of the game mechanics (the sonar double-edged sword), make architectural decisions (single draw call, passing parameters via texture), and weigh trade-offs among multiple optimization directions (size first or performance first). AI provided the implementation capability, but the directional choices and aesthetic judgments still came from the creator.
Of course, this experiment doesn't mean demoscene skills have become obsolete. AI assistance itself still requires the user to evaluate output quality, diagnose problems, and provide new ideas when the AI gets stuck.
Open Source and Further Reading
The complete source code and executable have been published on GitHub: https://github.com/zTrojan/blind-sector. Interested technical readers can dig into the specific implementation details of texture packing, SDF modeling, and Crinkler compression.
As an experimental project, Blind Sector provides an excellent reference case for the capability boundaries and technical choices of Vibe Coding: under strict physical constraints, AI-assisted coding can accomplish quite complex system-level work, but it remains an amplifier, not a replacement. Human creative direction and engineering judgment are still indispensable parts of the project.
One-line Summary
A developer used AI-assisted coding to build a sonar-themed FPS within 16KB, exploring the low-level optimization limits of Vibe Coding.
Paragraph Summary
The article introduces Blind Sector, a complete 16KB first-person shooter built by a developer using Vibe Coding, with Fable 5 handling planning and Opus 5.5 handling implementation and optimization. Set underground in darkness, players rely on sonar pulses at three frequencies to briefly illuminate the environment, while each pulse is also noise that exposes their position, creating a double-edged mechanic of information gathering and risk-taking. Technically, the author employed extreme measures including 2D DDA raycasting on a 64×64 grid, a single draw call with zero uniforms and texture-based parameter passing, SDF enemy modeling, Crinkler 300MB hash table compression, and LCG procedural music generation. The article argues that this experiment shows AI can handle highly difficult system-level optimization, but human direction-setting, aesthetic judgment, and architectural decisions remain irreplaceable core values.
Related articles

Chain of Thought Isn't Just for AI: How Humans Can Use CoT to Improve Thinking Quality
Chain of Thought isn't just a prompt trick for large models. Starting from a Hacker News discussion, this article analyzes why CoT works for human thinking too, breaks down actionable ways to transfer it, and highlights the key differences between human CoT and machine CoT.
Cloudflare Teams Up with OpenAI: Closi…
Cloudflare Teams Up with OpenAI: Closing the Loop from Vulnerability Discovery to Defense with AI
Cloudflare uses OpenAI Daybreak to investigate security vulnerabilities and generate reviewable remediation plans, while developers use Codex to boost coding efficiency and quality.

Orca Multi-Agent Orchestration in Practice: A Guide to Parallel Collaboration with Claude and Codex
Orca is Stable AI's free open-source agent workbench supporting 34 agents like Claude Code and Codex in parallel. Learn its Git worktree isolation, multi-model orchestration, and mobile management.