Play on GitHub Pages · Source · Ownership and licensing
Unofficial fan project. Dragon Ball / Dragon Ball Z: © Bird Studio/Shueisha, Toei Animation. Created by Akira Toriyama. DBZSim is not affiliated with or endorsed by the rights holders. The MIT licence covers the software, not Dragon Ball intellectual property. See NOTICE.md.
A Dragon Ball Z inspired, procedural flying world built from CUDA-authored GPU shaders. Namek opens by default, with blue highlands, tan mesas, green water, tall sparse trees and small dome villages. Earth has green plains, forests, mountain groups, coasts and cities with rounded towers and colored roofs. Both worlds use cel shading and share an articulated third-person flyer.
Double-click START.bat, or run npm run build followed by npm start. Open http://localhost:8092 in Edge or Chrome with WebGPU enabled. Node.js 20+ is required. No npm dependencies are needed for the application.
First launch can take several minutes while the GPU driver compiles the shaders. The loading screen reports progress. Later launches can use the verified shader cache.
| Input | Action |
|---|---|
| WASD / arrow keys | Fly in the direction you are looking |
| Drag mouse / F | Look / capture mouse |
| Esc | Release mouse |
| E / Space, Q | Ascend, descend |
| Shift | 5× boost with aura, flight lean and speed streaks |
| Z | Precision flight |
| Mouse wheel | Adjust flight speed |
| V | First / third person |
| 1–4 | Settlement/highlands, far horizon, forest/groves, coast/lakes |
| H | Hide / restore interface |
World settings contain the Earth/Namek world selector, lighting, sea state, seed, quality, image export and real-device GPU checks. These are distinct terrain and settlement rules, not just palette changes. Preset destinations are chosen by a GPU kernel from the current seed.
CUDA .cu source is translated by the bundled CUDA WebShader compiler into WGSL and executed as WebGPU compute. This is not a native NVIDIA CUDA executable. It does not require an NVIDIA card or a CUDA installation.
World descriptors, terrain queries, city lots, building intersections, tree intersections, spectral FFT ocean evolution, water shading, reflections, character shapes and final image pixels run on the GPU. There are no imported scene meshes, photographic textures or CPU scene-generation loops. JavaScript handles input/camera controls, the HTML interface, buffer allocation and GPU dispatch. CPU code in tests/ is an independent verification harness and is not the live renderer.
The world is generated from seeded 4,800 m regions with a floating origin. Continuous continental terrain spans region boundaries. Earth city terraces occupy lowland sites; mountains and forest groups surround the settlements. Namek uses stepped highlands and inland channels with sparse villages instead of metropolitan towers.
Terrain and city visibility extend to 48 km. Nearby object traversal covers 7.2 km; a separate distant-city path preserves building silhouettes beyond it, with distant vegetation sampled near terrain intersections. GPU-generated object descriptors cache local terrain and tree bases. Four FFT cascades give the ocean a 2,048 m spatial repeat, while the final water material uses broad colors, foam edges and painted wave strokes. Object traversal and reflections have bounded workloads.
- WaterCuda: reused the GPU runtime, compiler loader, FFT ocean, island traversal and floating-origin controls. Terrain, palette and presentation are adapted for this world.
- CudaAmazonForest: adapted the analytic ellipsoid crown/intersection approach for island forests.
- Straum city (
D:\Stratum-City): reworked the seeded lot, district falloff and avenue-exclusion ideas into the new capsule-city grammar. Its Manhattan scene and building models are not imported. - 3D Anime Shader: the banded lighting, rim/edge emphasis and painted palette inform new CUDA material functions; the Three.js material is not part of the live renderer.
- coastal-simulation: inspected for ocean/shore techniques. Its separate shallow-water solver, Three.js scene and assets are not integrated; this world uses the spectral ocean and procedural shore optics.
npm test: builds all 16 CUDA entry points and runs 18 control, compiler, buffer and scheduling checks.npm run test:native: checks 480 object rays, rebasing, and 16 safe preset positions; generates terrain/ocean fixtures using an independent CPU inverse FFT.- World settings → GPU diagnostics → Run GPU checks: real-device determinism, rebasing, cached FFT equivalence, CPU/GPU sample comparison, generated foliage atlas and validation errors.
npm run test:visual is an optional Playwright harness. Install Playwright locally with npm install --no-save --package-lock=false playwright, start the app, and use Edge with hardware WebGPU. Set DBZSIM_URL to test a deployed site, BROWSER_CHANNEL to select another installed Chromium channel, or PLAYWRIGHT_MODULE to use an existing Playwright module. The latest local run passed 22 browser/GPU checks, including world switching, flight, image export and actual visible city hits beyond 7.2 km. Its 13 real-device checks include distinct Earth/Namek terrain and Namek rebasing. Screenshots and the validation report are written to ignored artifacts/.
Pushes to main build all CUDA entry points, run JavaScript tests and the native C++ verification harness, package a static site, and deploy it to GitHub Pages. Pull requests run the build and checks without deploying. Workflows can also be started manually from the Actions tab. Actions are pinned to commit hashes.
npm run build:site creates dist/ from an explicit allowlist of runtime files, shader sources, generated shader artifacts and licences. No backend or secret is needed. The build supports a project subpath such as /DBZSim/; generated output is not committed. GitHub Pages must use GitHub Actions as its publishing source. The GPU diagnostics fixture is included in the deployed site.
GitHub-hosted CI checks compilation and CPU verification; it does not substitute for the separate real-GPU browser test. Browser support and GPU driver limits still apply on the public site. Use a current desktop Edge or Chrome with WebGPU enabled; first launch includes GPU pipeline compilation.
This is a playable free-flight exploration prototype. The flyer has procedural clothing, limbs, hair and flight poses, but remains an approximate shader-built character rather than a production character model. There are no enemies, combat, destruction, skeletal animation rig, interiors, collision-constrained movement, save system or audio. Nearby trees and buildings use analytic primitives. City/forest reflections are bounded ray queries. Distant detail is limited by pixel resolution and bounded traversal, and transitions can still be visible. The cel-shaded direction is implemented, but the character, vegetation and terrain art need further refinement to match the reference animation's detail.
See CREDITS.md and LICENSE for source attribution.