oneshotlm
Compare all models on this prompt →

Wolfenstein raycaster · qwen3.6-35b-a3b

Output generated Cost / run $0.0072 Runtime 75.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.6-35b-a3b
vendorQwen
harnesspi 0.87.1 · browser iteration
generated2026-10-14

METRICS

runtime75.8s
tokens in15k
tokens out9.2k
cached0
cost / run$0.0072
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 complete Wolfenstein-style first-person raycasting maze shooter in a single HTML file. Let me plan this out:

1. **Raycasting engine** - Cast rays for each column of the screen, render walls with procedural textures
2. **Player movement** - WASD for movement, arrow keys for turning, Space to shoot
3. **Enemies** - At least 3 enemies that can damage the player, occluded by walls
4. **Health system** - Player health, enemies damage player, game over at 0
5. **Win condition** - Defeat all enemies, reach exit, show win state
6. **Restart** - Restore full level state

Let me build this step by step, making sure everything works in a single self-contained HTML file.

Key technical considerations:
- Raycasting algorithm (cast rays for each vertical strip of the screen)
- Procedural textures (brick patterns generated via canvas)
- Sprite rendering for enemies (with depth sorting)
- Collision detection (solid wall collision)
- Game state management (health, enemy count, win/lose states)

Let me write this comprehensive implementation.

I'll build a complete Wolfenstein-style raycasting FPS game. Let me start by writing the full implementation.

→ write /tmp/job-JCDdyO/index.html (22279 bytes)
toolResult

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

assistant
thinking
Now let me test the game in the browser to verify it works correctly. I'll check:
1. Movement and turning near the starting area
2. Collision against a nearby wall
3. Shooting and weapon feedback
4. Wall rendering
5. Restart functionality
6. Health and enemy count

Now let me test the game 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."],"dom":"❤ 100\n💀 1\nSECTOR 7G\n+\nW/S: Move | A/D: Strafe | ←/→: Turn | Space: Shoot","images":"attached"}

assistant
thinking
The game renders correctly. Let me verify the key behaviors:

1. Movement and turning near starting area - visible walls render correctly
2. Collision against nearby walls - walls are properly rendered
3. Weapon feedback - gun is visible
4. HUD shows health (100), enemy count (1), and controls

Let me test shooting (Space), check enemy interactions, and verify the restart functionality. I'll also test movement and make sure enemies are present and visible.

Let me check what the current state is and try shooting, moving, and testing more thoroughly.

The game renders correctly. Let me verify shooting, movement, and enemy behavior: