3D environment / level generation
Procedural WebGL Street Level With Zero Art Files
Tested with Claude · produced Blackline: Strike
The Prompt
Generate a complete, art-file-free street level for a browser FPS in ONE self-contained HTML file (WebGL2 or Three.js from a pinned CDN, inline CSS/JS). Every model, texture, normal map and decal must be produced by code at load time. The target is a 150-200 metre market street that reads as a real place in under two seconds of load. Level layout: - A seeded generator builds the street from a grammar: a road spine, two pavements, building facades on both sides, market stalls, awnings, crates, barriers and two enterable shops. The seed must be reproducible and printable in the URL. - Provide three named districts with different palettes and props (market, industrial, old quarter) so the same generator can dress three looks without new assets. - Guarantee navmesh connectivity: every enterable interior has two exits, and no prop may block the main sightline for more than 40% of its length. Procedural art: - Textures: generate albedo, roughness and a simple normal map with layered value noise, brick or corrugated patterns, stains, edge wear and painted signage. Use canvas or shader generation, not base64 images. - Geometry: build buildings from a modular kit (wall, window, door, shutter, roof lip, pipe, cable) and merge static meshes per material. Keep draw calls under 120 for the whole street. - Decals: cracks, oil stains, posters and road markings placed by rules, with a hard cap of 300 decals. Lighting and mood: - One late-afternoon sun with long shadows, a warm key light and a cool sky bounce. Bake a simple ambient occlusion term into vertex colours instead of shipping lightmaps. - Add dust motes, heat shimmer and a distance haze that hides the level edge. Fog colour must match the sky at the horizon. Performance: - Instanced geometry for repeated props, texture atlases per district, frustum culling and a hard triangle budget of 350k for the street. - Report load time, draw calls, triangle count and texture memory after generation. Fail the build if any exceeds the budget. Testing and delivery: - Print the generator seed, a top-down map with navmesh connectivity, and a table of props per district. - Include a debug fly camera (F) and a wireframe toggle (G) so the level can be inspected. - Deliver in stages: road and blockout first, then modular buildings, then procedural textures, then props and decals, then lighting and fog.
What This Prompt Produces
Blackline: Strike proves the approach: the entire market street, including textures, animation and audio, is generated from code with no external art assets, which is why it opens instantly. The modular kit plus per-material merging is what keeps a street this detailed inside a browser budget.
Modification Tips
- Seed the generator and print the seed. A procedural level you cannot reproduce is a bug report you cannot act on.
- Merge static geometry per material before adding props. Draw calls, not triangles, are what kill browser FPS builds.
- Bake ambient occlusion into vertex colours. It removes the need for lightmaps without making the scene look flat.
- Validate navmesh connectivity in code. A beautiful street with an unreachable shop is worse than a plain one that works.
The Game This Prompt Produced
Want to try it? Open Claude, paste the prompt, and you'll have a playable game in minutes. When you're happy with the result, submit it to Daily AI Games.