Walk through a 3D cyberpunk city built purely from ASCII characters — a text-based metropolis runs on a 283KB Rust WebAssembly engine feeding a WebGL renderer
Solo developer Grow Now! Games has put a playable browser build of its walkable ASCII cyberpunk city online, powered by a 283KB Rust WebAssembly engine and rendered in WebGL.
A developer named Grow Now! Games has recently showcased a walkable ASCII cyberpunk city on the web, powered by a compact 283KB Rust WebAssembly engine and a WebGL renderer. The online demo has already garnered over a million views and 9,000 comments within a week of its release. An accompanying YouTube video offers a deeper dive into the city's interiors, elevation, and skyscrapers.
The game eschews traditional 3D models, textures, or shaders, relying instead on raw ASCII characters to create its visually striking world. The Rust engine generates the city's layout and details, packing base64-encoded byte arrays into JavaScript to define variables such as building heights, tile kinds, surfaces, hues, saturations, window styles, lit flags, and floor plan IDs.
These assets are then processed by a WebGL context, which compiles a pair of vertex and fragment shaders. The fragment shader's sole task is to perform a single texture2D lookup.
The characters are drawn individually into an atlas canvas using the fillText method, a process optimized by caching per character-and-color combinations. These cached characters are subsequently uploaded to the GPU, where they're rendered as textured quads with six vertices each. The atlas cells are 11 pixels tall, matching the width of a monospace character plus two pixels. During each frame, all visible cells are uploaded to a single buffer, culminating in a single drawArrays call.
To ensure accessibility, the game includes two fallbacks for environments where WebGL is unavailable. One fallback utilizes the Canvas 2D drawImage method, while the other falls back to a per-cell fillText approach. Furthermore, the game supports touch devices by adjusting its resolution: 180 columns by 80 rows (14,400 character cells) at a standard setting, while touch devices render at 48 rows and between 96 and 168 columns. The Rust engine also offers a specialized 160 by 112 profile for devices with limited resources.
The original demo, as reported by PC Gamer, was built without relying on Unity, Unreal, or any 3D models, textures, or shaders. Instead, it draws inspiration from a first-person Backrooms game designed for a 1994 Sega 32X, which runs on a raycasting engine written from scratch in C and SH-2 assembly. Additionally, Grow Now! Games has experimented with a multiplayer Doom tribute that employs raycasting and sprite projection as a SQL view stack, achieving approximately 30 frames per second at a resolution of 128 by 64.
The ASCII roguelike Thunder Lizard has even expanded its character grid into full-motion visuals, albeit at a sluggish pace of around 10 frames per second.
Written by urgent.news from Tom's Hardware's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.