oneshotlm
Compare all models on this prompt →

Dangerous Dave platformer · grok-4.6

Output generated Cost / run $0.1196 Runtime 136.9s

Prompt for this run

Build a playable tile-based platformer on a canvas in the Dangerous Dave style: navigate a level to grab a trophy and then reach the exit, avoiding hazards like fire and water, with jumping and simple enemies. Procedural graphics only, no external assets.

⛨ 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

modelgrok-4.6
vendorxAI · Grok
harnesspi-agent
generated2026-08-13

METRICS

runtime136.9s
tokens in26k
tokens out12k
cached2.4k
cost / run$0.1196
Transcript · 6 messages
user

Build a playable tile-based platformer on a canvas in the Dangerous Dave style: navigate a level to grab a trophy and then reach the exit, avoiding hazards like fire and water, with jumping and simple enemies. Procedural graphics only, no external assets.

assistant
thinking
The user wants me to build a complete single-page web app - a tile-based platformer in the Dangerous Dave style. Let me plan this out thoroughly.
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>DANGEROUS DAVE</title>
<style>
  body{margin:0;background:#000;display:flex;justify-content:center;align-items:center;height:100vh;font-family:monospace}
  canvas{border:4 px solid #222;background:#0a0a2a}
  #ui{position:absolute;top:12px;left:12px;color:#ff0;font-size:18px;text-shadow:2px 2px #000}
</style>
</head>
<body>
<canvas id="c" width="800" height="480"></canvas>
<div id="ui">SCORE <span id="score">000000</span> LIVES <span id="lives">♥♥♥</span></div>

<script>
// =============== DANGEROUS DAVE – single file ===============
const canvas = document.

Building a self-contained Dangerous Dave–style platformer with procedural graphics, tile physics, hazards, and a trophy-then-exit objective.

→ write /tmp/ws/index.html (29511 bytes)
toolResult

Successfully wrote 29511 bytes to /tmp/ws/index.html

assistant
thinking
The file was written. Let me verify it exists and is complete. The user asked for a single self-contained index.html with a playable tile-based platformer. I've created that. Let me do a quick sanity ...
→ bash {"command":"ls -la /tmp/ws/index.html && wc -l /tmp/ws/index.html"}
toolResult

-rw-r--r--. 1 node node 29526 Aug 13 01:32 /tmp/ws/index.html 986 /tmp/ws/index.html

assistant
thinking
The game is written. Let me give a brief summary of what was built.

`index.html` is a self-contained Dangerous Dave–style platformer (canvas only, no external assets). **Goal:** grab the golden trophy, then reach the exit door. Gems are optional score. **Controls:** A/D or arrows to move, W/Space to jump, Enter to start, R to restart the room. **Play:** 3 caverns, 3 lives. Fire, water, and spikes kill instantly. Red walkers patrol ledges. Door stays locked until you have the trophy. Jump uses coyote time and a short buffer so it feels fair. Graphics and sound are all procedural (bricks, flames, water, spikes, trophy, door, Dave, enemies, particles, plus tiny Web Audio beeps).