oneshotlm
Compare all models on this prompt →

Wolfenstein raycaster · gpt-5-mini

Build a first-person raycasting maze shooter on a canvas in the Wolfenstein 3D style: WASD movement and arrow or mouse turning through a textured grid maze with enemies you can shoot. Procedural textures only, no external assets.

⚠ no runnable output

This one-shot run produced no runnable artifact.

agent produced no index.html

The transcript below shows what the model did — read it to see why the one shot fell short.

transcript · 2 messages
user

Build a first-person raycasting maze shooter on a canvas in the Wolfenstein 3D style: WASD movement and arrow or mouse turning through a textured grid maze with enemies you can shoot. Procedural textures only, no external assets.

assistant
thinking
**Designing a raycaster game**

I need to create an index.html for a Wolf3D-style raycaster that includes procedural textures. It should allow movement with WASD, turning with the mouse or arrow keys, shooting at enemies, handling collisions, and maybe even a minimap. I’ll use canvas without external assets, implementing physics for bullets and enemies with simple AI. For procedural textures, I’ll explore checkerboard, brick, and wood patterns. Additionally, I’ll need to set up raycasting to detect hits and manage projectile bullets while incorporating mouse controls for shooting.**Developing game mechanics**

I’m deciding that ammo won’t be necessary. For mouse turning, I’ll need to implement pointer lock to capture movement, plus provide on-screen instructions to click the canvas for that. If the pointer isn't locked, I'll also allow mouse movement without it. 

Next, I’ll create small canvases for procedural textures like brick, stone, wood, and metal and add gradient shading for floors and ceilings. I also want to generate a maze using DFS, placing enemies in open cells while ensuring the player starts in the center. Enemies will have simple AI to wander randomly or chase if the player comes close.**Implementing shooting mechanics**

For the shooting logic, I’ll cast a ray to check the distance and angle to sprites. The idea is to project the sprite relative to the player and see if it's within the column width based on its screen position. To simplify, I can use hitscan by casting multiple samples. 

Alternatively, I might cast a single ray at the center column to check for sprite collisions before hitting a wall. For controls, I’ll use WASD for movement, the arrow keys or mouse for turning, and clicks to shoot. I’ll ensure the canvas is responsive while optimizing the resolution, scaling it to 320x200 for manageability.**Setting up raycasting framework**

I’m starting with the HTML structure to make the canvas full-screen, along with an info overlay. In my JavaScript, I’ll define constants for map width and height and generate a maze using a recursive backtracker. 

Next, I’ll create a function, `makeTexture(type, size)`, to generate textures on canvas. For the raycaster, I need to define screen width, height, number of rays, and field of view. 

For each ray, I’ll calculate the ray direction from the player angle, perform DDA on the grid to find hits, and calculate the perpendicular distance using the typical raycasting algorithm. Texturing will involve computing the wallX coordinate to pull from the texture canvas without using slow `getImageData`. Instead, I'll draw scaled image portions using `drawImage`. For the floor and ceiling, I might go with a simple vertical fill using a gradient.**Finalizing game implementation**

To simplify, I'll first draw rectangles for the ceiling and floor with a shading gradient, skipping per-pixel floor casting. For sprites, I’ll create an array of enemies with their coordinates and direction, and ensure they are rendered correctly based on camera space. While rendering, I’ll calculate their height and position, accounting for wall occlusions to ensure they only draw where visible. 

For shooting, I need to detect the nearest sprite within a specific threshold for health reduction and visual effects. Enemy AI will move towards the player when close, but wander otherwise. As for bullets, I’ll focus on an instant hitscan mechanism. 

I'll ensure the code remains functional but not overly complex. The map generation must use odd dimensions and a border wall. I'll also create 64x64 canvases for textures and design sprites as simple colored circles or faces. Lastly, I will implement pointer lock for better control, support arrow keys for rotation, and design a minimap overlay. Now, I’ll start composing the index.html content with a main loop using requestAnimationFrame.

I will create the single-file web app now. It will be written into index.html in the current directory and be fully self-contained (procedural textures only, no external resources). Proceeding to write the file.

TAKE IT TO CODE

This run produced no artifact — reuse the prompt with a different model or your own pi-agent run.

RUN

modelgpt-5-mini
vendorOpenAI
harnesspi-agent
generated2026-07-22

METRICS

runtime
tokens in1.2k
tokens out1.2k
cached0
cost / run$0.0027