Building a 3D Deep-Sea Game Prototype in 37 Minutes: A Practical Workflow
This article walks through building a playable 3D deep-sea exploration prototype in a 37-minute time box, using code only. It covers the six-module architecture, a five-stage delivery schedule, and key implementation details for procedural terrain, underwater atmosphere, vehicle physics, camera switching, sonar interaction, and performance optimization. Readers will find acceptance criteria, common risks, and engineering practices for evaluating AI coding tools on complex graphics tasks.
1. Background and Goal: Why 3D Scene Development Is the Test
When evaluating high-performance AI coding tools, 3D scene development tends to expose real engineering capability more clearly than data processing or text generation. It is not a single-point task but a complete chain: procedural modeling, materials and lighting, animation and physics, input control, camera systems, interaction logic, and performance budgeting. If any link is missing, the result stays a “demo clip” rather than a “playable prototype.”
The original concept was the Deep-Sea Exploration Plan: build a visually dense underwater world from scratch using code only, with complex terrain, deep-sea creatures, shipwreck relics, and research facilities. The player pilots a submersible across different sea zones, switches between first-person and third-person views, and interacts with the environment through sonar, searchlights, and other mechanics. The acceptance standard is not “looks good” but “playable, runnable, and extensible.”
The objective function at the prototype stage should be “reach a runnable closed loop as fast as possible,” not asset precision in one pass. The point of 37 minutes is not to show off, but to verify whether the path from an empty project to an interactive scene is short enough and reusable enough.
2. Overall Architecture: Splitting the Game into Parallel Modules
To keep generation controllable, split the project into six modules that communicate through clear interfaces:
- World generation: terrain height fields, sea-zone partitioning, resource-point distribution.
- Rendering and atmosphere: underwater fog, volumetric light, particles, tone mapping.
- Vehicle and physics: submersible kinematics, buoyancy and damping, collision.
- Camera system: first/third-person switching, damped follow, view zoom.
- Interaction and tasks: target pickup, info panels, sonar scanning.
- Performance and observability: frame-rate budget, object pooling, logs and metrics.
The benefit is that generative tools can produce module by module, and each completed block can be run and verified immediately, avoiding the problem of a monolithic output where issues cannot be localized.
3. The 37-Minute Time Box: A Staged Delivery Strategy
Split the time box into five segments, each with an acceptance artifact:
- 0–6 min: project skeleton and scene loop. Make sure it runs and the camera can rotate.
- 6–15 min: terrain and sea-zone partitioning. Form an “explorable space.”
- 15–23 min: vehicle control and camera switching. Turn the “showroom” into a “game.”
- 23–31 min: interaction and atmosphere. Sonar, searchlights, info panels.
- 31–37 min: performance and stability. Object pooling, culling, frame-rate monitoring.
A common mistake in the first version is “the scene looks great but is not playable.” This usually happens because vehicle movement and the camera system are missing, leaving the user able only to observe in third person. The fix is to complete “movement + view switching” immediately after the second stage.
4. Key Implementation Details and Sample Code
1) Procedural Terrain: Height Field + Partitioning
Use deterministic noise to generate the height field for reproducibility and easy tuning:
# Pseudocode: deterministic height fielddef height(x, z):h = fbm(x * 0.02, z * 0.02, octaves=5, seed=42)trench = -smoothstep(0.6, 1.0, fbm(x*0.005, z*0.005, seed=7))*30return h*8 + trench
Key points: fix randomness with a seed; use a trench function to create deep-sea trenches; use partitioning to determine creature and relic density.
2) Underwater Atmosphere: Fog + Volumetric Light + Particles
The core of underwater visuals is “visibility falloff.” Combine exponential fog with depth-based coloring, then add a small amount of volumetric light and suspended particles for depth:
fog = exp(-density * distance)color = mix(deepColor, shallowColor, clamp(depth/200,0,1))
Control particle count and transparency sorting to avoid flicker and overdraw.
3) Vehicle Motion: Damping and Buoyancy
Submersible feel depends on damping and acceleration limits, not maximum speed:
# Pseudocode: damped motionvel += input_dir * accel * dtvel *= exp(-damping * dt)pos += vel * dt
Adding slight buoyancy and attitude recentering noticeably improves the “underwater” feel.
4) Camera System: Dual Views and Damped Follow
if mode == first_person: camera.position = vehicle.headelse: camera.position = lerp(camera.position, vehicle.pos + offset, 1-exp(-k*dt))
Interpolate over 0.2–0.4 seconds when switching to avoid jumps that cause motion sickness.
5) Interaction: Sonar and Clickable Targets
Sonar can be implemented with a screen-space post-process or simple distance-sorted highlighting; clickable targets use raycasting plus an info panel binding:
hit = raycast(camera.forward)if hit and hit.type == "relic":ui.show(hit.info)
6) Performance: Object Pooling and Culling
Common bottlenecks in deep-sea scenes are transparent materials and large numbers of creature instances. Reuse creatures with object pools, cull by distance, and merge static meshes to keep the frame rate within budget.
5. Iteration Criteria: From a “Science Showroom” to an “Exploration Game”
Use four hard metrics to judge whether the prototype holds up:
- Movable: the vehicle can move continuously in 3D space with collision.
- Switchable: first/third-person switching has no jumps.
- Discoverable: unknown areas and information unlocks exist.
- Stable: no clipping, no flicker, and no obvious frame drops at the target frame rate.
If it only “looks good,” the interaction and task layers are missing; if it “moves but feels dizzy,” tune camera damping and switch interpolation first.
6. Common Risks and Engineering Recommendations
- Non-reproducible randomness: fix seeds and version parameters.
- Transparency-sorting flicker: reduce stacked transparency and control particle density.
- Physics jitter: increase damping, limit acceleration, and use a fixed time step.
- Delivery interruption: produce a runnable version at each stage and keep rollback points.
- Insufficient observability: log frame rate, draw calls, and object counts to help localize issues.
7. Conclusion
The real value of running a 3D deep-sea prototype in 37 minutes is turning 3D game development from inspiration-driven to process-driven: close the loop first, then add atmosphere, then content, using module interfaces and time boxes to constrain generation. For teams that want to evaluate how AI coding tools perform on complex graphics engineering, this method can be reused for other scenes (cities, space, underground caves) by simply replacing world-generation and atmosphere parameters to get a playable prototype.
