I prompted GLM 5.2 Deep Think Maxx to build a 3D zombie survival game — 2,400 lines of Three.js in one shot


I put GLM 5.2 Deep Think Maxx to the test in a hands-on glm 5.2 coding evaluation: build a complete three js game targeting the zombie survival 3d genre in a single HTML file. No frameworks, no external assets, no separate files — just Three.js from a CDN and raw JavaScript. What came back was a 2,400-line game with third-person combat, wave survival, particle effects, and a procedural dark city environment.
This is still being updated, but the initial output is already playable and surprisingly polished for a one-shot generation.
What I asked for: Zombie survival game prompt
The prompt was deliberately ambitious — the kind of spec that would take a solo developer a weekend to implement. I wanted to see how far a single generation could go with a detailed game design document as input.
You are an expert Three.js game developer.
Create a complete 3D zombie survival fighting game in ONE SINGLE HTML FILE.
IMPORTANT:
- Output ONLY one file: index.html
- Put all HTML, CSS, and JavaScript inside this single file.
- Do not create any other files.
- Do not use external assets.
- Do not use React, TypeScript, or any frameworks.
- Use only Three.js from CDN.
- The final file must run by double-clicking index.html.
GAME:
Create a third-person 3D zombie fighting survival game.
The player controls one human warrior fighting endless waves of zombies in a dark abandoned city.
TECH:
Use:
- Three.js
- HTML5
- CSS
- Vanilla JavaScript
GAME FEATURES:
PLAYER:
Create the player character using Three.js primitive geometry:
- Head
- Body
- Arms
- Legs
- Weapon
Add animations:
- Idle
- Walking
- Running
- Sword attack
- Heavy attack
- Taking damage
- Death
Controls:
WASD:
- Move character
Mouse:
- Rotate camera
Left mouse:
- Normal attack
Right mouse:
- Heavy attack
Space:
- Dodge roll
E:
- Special attack
COMBAT:
Implement:
- Zombie hit detection
- Player attack range
- Damage system
- Knockback
- Hit stun
- Combo counter
- Critical hits
- Cooldown system
ZOMBIES:
Create zombie enemies using procedural Three.js models.
Zombie types:
Normal Zombie:
- Slow
- Low health
Fast Zombie:
- Quick movement
- Low damage
Tank Zombie:
- Large
- High health
- Strong attack
AI:
- Spawn around player
- Chase player
- Move toward player
- Attack when close
- Take damage
- Die with animation
WAVES:
Create endless survival mode:
- Wave counter
- Increasing zombie count
- Increasing difficulty
- Score system
VISUAL EFFECTS:
Add:
- Blood particles
- Hit sparks
- Weapon trail
- Floating damage numbers
- Screen shake
- Explosion effect for special attack
WORLD:
Create a 3D environment:
- Dark city street
- Ground plane
- Buildings
- Street lights
- Fog
- Night atmosphere
LIGHTING:
Use:
- Directional light
- Ambient light
- Point lights
- Shadows
- Fog
CAMERA:
Create smooth third-person camera:
- Follow player
- Rotate around player
- Zoom during attacks
- Shake when hit
UI:
Create HTML overlay:
- Health bar
- Stamina bar
- Score
- Zombie kills
- Wave number
- Game over screen
- Restart button
PERFORMANCE:
Optimize:
- Object pooling for zombies
- Low-poly geometry
- Maximum 50 zombies active
- Smooth 60 FPS gameplay
CODE:
Everything must be inside:
script — all JavaScript here
style — all CSS here
No explanations. No markdown. No separate files.
Return only the complete index.html code.
What GLM 5.2 delivered
Interactive Demo
W A S D / Arrow Keys to drive
The output is a fully self-contained HTML file that runs by double-clicking — no build step, no server, no dependencies beyond the Three.js CDN. Here is what made it into the first generation:
Game features breakdown
Player and combat
The player character is built entirely from Three.js primitives — boxes for the body, cylinders for limbs, a sphere for the head, and a cone-tipped weapon. GLM implemented six animation states (idle, walking, running, light attack, heavy attack, taking damage) by procedurally animating limb rotations each frame. The combat system includes:
- Light attack (LMB / J) — fast sword swing, 30 base damage
- Heavy attack (RMB / K) — slower but 75 damage with more knockback
- Slam (E) — AoE special with 130 damage in a 6-unit radius, 10s cooldown
- Heal (R) — restores 40 HP, 16s cooldown
- Combo counter — tracks consecutive hits with a visible multiplier
- Critical hits — 22% chance for 2.2x damage with a golden particle burst
Zombie AI
Three zombie variants spawn in waves with increasing difficulty:
Each zombie has pathfinding that chases the player, attack cooldowns, hit stun, knockback physics, and a death animation with dismemberment particles. The object pooling system caps active zombies at 40 to maintain performance.
Environment and atmosphere
The procedural city includes buildings of varying heights, street lights with point light sources, a dark ground plane, volumetric fog, and a night atmosphere. The lighting setup uses directional light for moonlight, ambient light for base illumination, and individual point lights on street lamps that cast into the fog.
Visual effects
The particle system handles blood splatter, hit sparks, critical hit bursts, AoE slam effects, and heal particles — all using instanced sphere geometry with velocity, gravity, and fade-out. Floating damage numbers render as HTML overlays projected from 3D world positions. Screen shake triggers on both dealing and receiving damage.
HUD
The full overlay includes health bar (with low-HP pulse animation), stamina bar, score counter, wave number, kill count, ability cooldown indicators, combo display, wave announcements, a title screen with controls guide, and a game over screen with final stats.
GLM 5.2 coding benchmark results: What impressed me
The code architecture is genuinely well-organized for a 2,400-line single file. GLM created proper class hierarchies — Input, ParticleManager, DamageNumbers, and separate game state management — rather than dumping everything into global scope. The pointer lock handling even includes graceful error recovery for browser compatibility.
The combat feel is the real standout. The combination of knockback, hit stun, screen shake, particle effects, and floating damage numbers creates surprisingly satisfying feedback for what is fundamentally boxes hitting other boxes. The combo counter adds a layer of engagement that most AI-generated games completely miss.
What needs work
This is still being updated. The biggest issue is one GLM could not fix across multiple attempts:
- Camera aim stuck on player body — this is the main problem. The third-person camera locks its aim point to the player's torso, so you are staring at your own character's back instead of seeing the zombies coming at you. I prompted GLM multiple times to fix the camera offset and look-at target — it kept failing. The game is genuinely good otherwise, but this single issue makes it hard to play effectively
- Camera clips through buildings in tight spaces
- Zombie spawn distribution can cluster in corners
- No audio (the prompt did not request it, but the game feels incomplete without impact sounds)
- Performance dips on wave 8+ when tank zombies stack up
- The dodge roll (Space) could use i-frames tuning
Honest assessment
Try it yourself
You are an expert Three.js game developer.
Create a complete 3D zombie survival fighting game in ONE SINGLE HTML FILE.
Requirements:
- Single index.html with all HTML, CSS, and JavaScript inline
- Three.js from CDN only, no other dependencies
- Third-person camera with smooth follow and mouse rotation
- Player character built from primitive geometry with sword attacks
- Three zombie types: Normal (slow), Fast (agile), Tank (heavy)
- Wave-based endless survival with scaling difficulty
- Combat system with light attack, heavy attack, AoE special, and heal
- Combo counter, critical hits, knockback, and hit stun
- Particle effects: blood, sparks, critical burst, AoE explosion
- Floating damage numbers projected from 3D positions
- Procedural dark city environment with buildings, street lights, and fog
- Full HUD: health bar, stamina bar, score, wave, kills, ability cooldowns
- Object pooling for zombies (max 40-50 active)
- Game over screen with stats and restart
- Must run by double-clicking the HTML file


