oneshotlm
Compare all models on this prompt →

Wolfenstein raycaster · qwen3.5-35b-a3b

Output generated Cost / run $0.0076 Runtime 48.8s

Prompt for this run

Build a playable first-person raycasting maze shooter on a canvas in a Wolfenstein-inspired style. Use HTML, CSS, and JavaScript as needed. Write it to `index.html` in the current working directory using your file tools. Inline your own CSS and JavaScript. Do not use external assets, CDNs, or network requests. No third-party libraries are provided. Required behavior: - Render a textured grid maze through a raycaster, with perspective wall heights and visible enemies. Generate textures procedurally; do not load external assets. - Use W/S to move forward/backward, A/D to strafe, Left/Right arrows to turn, and Space to shoot. Display the controls. Mouse turning is optional and must not be required. - Use solid wall collision and a small level with a reachable exit and at least three enemies. Enemies must be occluded by walls; shots cannot damage an enemy through a wall. - Give the player health. Enemies can damage the player under a clear attack rule. Show health and remaining enemy count; zero health causes Game Over. - Defeating all enemies unlocks the exit; reaching it shows a win state. Provide Restart to restore the level, player, enemies, and health. Verify: Test movement and turning near the starting area, check collision against a nearby wall, and fire to inspect weapon feedback. Sample the scene for stable wall rendering, then use Restart and check the initial viewpoint and health.

⛨ sandboxed Open in new tab ↗

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelqwen3.5-35b-a3b
vendorQwen
harnesspi 0.87.1 · browser iteration
generated2026-10-16

METRICS

runtime48.8s
tokens in15k
tokens out8.8k
cached0
cost / run$0.0076
Transcript · 7 messages
system

user

Build a playable first-person raycasting maze shooter on a canvas in a Wolfenstein-inspired style. Use HTML, CSS, and JavaScript as needed. Write it to `index.html` in the current working directory using your file tools. Inline your own CSS and JavaScript. Do not use external assets, CDNs, or network requests. No third-party libraries are provided. Required behavior: - Render a textured grid maze through a raycaster, with perspective wall heights and visible enemies. Generate textures procedurally; do not load external assets. - Use W/S to move forward/backward, A/D to strafe, Left/Right arrows to turn, and Space to shoot. Display the controls. Mouse turning is optional and must not be required. - Use solid wall collision and a small level with a reachable exit and at least three enemies. Enemies must be occluded by walls; shots cannot damage an enemy through a wall. - Give the player health. Enemies can damage the player under a clear attack rule. Show health and remaining enemy count; zero health causes Game Over. - Defeating all enemies unlocks the exit; reaching it shows a win state. Provide Restart to restore the level, player, enemies, and health. Verify: Test movement and turning near the starting area, check collision against a nearby wall, and fire to inspect weapon feedback. Sample the scene for stable wall rendering, then use Restart and check the initial viewpoint and health.

assistant
thinking
The user wants me to build a first-person raycasting maze shooter in a single HTML file. Let me break down the requirements:

1. **Raycasting engine** - Wolfenstein 3D style with:
   - Textured grid maze (procedurally generated)
   - Perspective wall heights
   - Visible enemies

2. **Controls**:
   - W/S - move forward/backward
   - A/D - strafe left/right
   - Left/Right arrows - turn
   - Space - shoot
   - Display controls on screen

3. **Game mechanics**:
   - Solid wall collision
   - Small level with reachable exit
   - At least 3 enemies
   - Enemies occluded by walls (can't shoot through walls)
   - Player health system
   - Enemies can damage player under clear line of sight
   - Health and enemy count display
   - Game Over when health = 0
   - Defeating all enemies unlocks exit
   - Win state when reaching exit
   - Restart button

4. **Verification**:
   - Test movement and turning near start
   - Check collision against nearby wall
   - Fire to inspect weapon feedback
   - Sample scene for stable wall rendering
   - Check initial viewpoint and health

Let me create a complete raycasting game in a single HTML file. I'll use:
- Canvas API for rendering
- Procedural texture generation (no external assets)
- Raycasting algorithm similar to Wolfenstein 3D

Let me write this step by step:

```html
<!DOCTYPE html>
<html>
<head>
    <title>Raycasting Maze Shooter</title>
    <style>
        /* CSS here */
    </style>
</head>
<body>
    <canvas id="gameCanvas"></canvas>
    <script>
        // JavaScript here
    </script>
</body>
</html>
```

I'll implement a complete raycasting engine with:
- A 2D array for the maze
- Raycasting algorithm for wall rendering
- Procedural texture generation (brick, stone, etc.)


- Enemy rendering with proper occlusion
- Collision detection
- Shooting mechanics

I'll create the complete game file now.

I'll build a complete raycasting maze shooter game in a single HTML file. Let me write this out:

→ write /tmp/job-gewxeV/index.html (30390 bytes)
toolResult

Successfully wrote to /tmp/job-gewxeV/index.html

assistant
thinking
The file was written. Let me now test the game by running it in the browser and verifying the behavior. I'll use the browser tool to open the file and inspect the output.

Now let me test the game by running it in the browser:

→ browser {"action":"screenshot"}
toolResult

Frame 1, +0ms

[Browser image supplied to model]

{"console":["warning: An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.","error: Identifier 'wallX' has already been declared"],"dom":"Health: 100%\nEnemies: 0\nExit: Locked\nW/S: Move | A/D: Strafe | ←/→: Turn | Space: Shoot","images":"attached"}

assistant
thinking
I can see the game has some issues: there's a JavaScript error "Identifier 'wallX' has already been declared" and the rendering is not showing a proper maze. The controls are displayed but I need to fix the code to have proper raycasting rendering, enemies, and game mechanics. Let me rewrite the complete game with all required features working properly.

Let me fix the issues and create a complete, working game: