Creating Games
How to create playable browser games with VULK.
Creating Games
VULK generates fully playable browser games — from 2D dungeon crawlers to 3D open-world driving games.
Game Types
| Type | Technology | Best For |
|---|---|---|
| 2D Canvas | HTML5 Canvas | Roguelikes, RPGs, dungeon crawlers, top-down games |
| 3D Physics | Three.js + Cannon.js | Racing, platformers, shooters, arcade games |
| Advanced 3D | Three.js + Physics | Open-world, city driving, flight simulators |
VULK automatically detects which type to generate based on your prompt.
2D Canvas Games
Tile-based games rendered on HTML5 Canvas with procedural generation.
"Create a dungeon crawler RPG with multiple floors, enemies, and loot"
This generates:
- Procedural maps — different layout every playthrough
- Turn-based combat — bump into enemies to attack
- Player progression — HP, XP, attack, defense stats
- Multiple floors — descend deeper for harder enemies
- HUD — health, score, and floor displayed on canvas
Controls
- Desktop — WASD or arrow keys to move
- Mobile — Swipe gestures for direction
Prompt Examples
"Create a roguelike dungeon crawler with potions, traps, and a boss on floor 5"
"Create a pixel-art top-down RPG with an overworld, towns, and random encounters"
"Create a Zelda-style adventure game with keys, locked doors, and treasure"
3D Physics Games
3D games using Three.js for rendering and Cannon.js for realistic physics.
"Create a 3D racing game with a track, jumps, and boost pads"
This generates:
- Physics engine — realistic collisions, gravity, and friction
- Vehicle controls — acceleration, steering, braking
- Camera system — third-person follow camera
- HUD overlay — speed, score, lap counter
Prompt Examples
"Create a 3D platformer with jumping, moving platforms, and collectible coins"
"Create an arcade space shooter with asteroids, power-ups, and a boss fight"
"Create a bowling game with realistic pin physics"
Advanced 3D Games
Large-scale 3D games with procedural worlds, traffic systems, and day/night cycles.
"Create a GTA-style driving game with a procedural city, traffic, and day/night cycle"
This generates:
- Procedural city — buildings, roads, and intersections
- Traffic AI — cars driving on roads with collision avoidance
- Day/night cycle — dynamic lighting and sky color changes
- Vehicle physics — suspension, steering, acceleration
- Third-person camera — smooth follow with rotation
Prompt Examples
"Create an open-world driving game with a city, highway, and countryside"
"Create a flight simulator with terrain, buildings, and cockpit instruments"
"Create a 3D survival game with crafting, enemies, and a day/night cycle"
What Gets Generated
2D Canvas (8-10 files)
src/
├── App.tsx # Game state machine (menu → playing → gameover)
├── components/
│ └── GameCanvas.tsx # Canvas element + engine mount
├── game/
│ ├── GameEngine.ts # Core loop, render, input, combat
│ ├── MapGenerator.ts # Procedural dungeon (BSP algorithm)
│ └── types.ts # Entity interfaces
└── index.css # Full-screen dark canvas3D Physics (12-15 files)
src/
├── App.tsx # State machine + Canvas wrapper
├── components/
│ ├── GameScene.tsx # Physics world + objects
│ ├── Player.tsx # Player mesh + physics body
│ ├── Track.tsx # Environment geometry
│ └── HUD.tsx # Score, speed, controls overlay
├── hooks/
│ └── useInput.ts # Keyboard + touch handler
└── utils/
└── physics.ts # Physics helpersGame Architecture
All VULK games use a state machine pattern instead of page routing:
Menu → Playing → Game Over
→ VictoryThe game loop runs inside a single requestAnimationFrame cycle — React handles only the menu screens and HUD overlay, while the game engine handles all gameplay rendering and logic.
Tips
- Be specific about mechanics — "bump combat with XP system" produces better results than just "RPG"
- Mention the genre — keywords like "roguelike", "platformer", or "racing" activate specialized generation
- Describe the win condition — "defeat the boss on floor 10" or "complete 3 laps"
- Request specific features — "power-ups", "inventory", "minimap", "leaderboard"
- Keep scope realistic — a focused game with polished mechanics beats an ambitious one that breaks
Limitations
- Games run in the browser — performance depends on device hardware
- 3D games require WebGL support (most modern browsers)
- Multiplayer is not supported (single-player only)
- No asset imports — games use procedural graphics, shapes, and emoji sprites
- Complex games may need follow-up edits to fine-tune mechanics