LLM Test Prompts

All prompts › Simulations & physics

50+ bouncing balls with gravity and collisions (canvas)

Simulations & physicsmediumbuild testPrompt in EnglishHTMLcanvassmall models

What it tests: Ball-ball collision response with mass, damping and wall bounces for 50+ objects, delta-time animation and some optimisation, inside a fixed HTML boilerplate.

Prompt length: 6,121 characters, roughly 1,530 tokens (estimate). Set a large context in your runner so the prompt and a long answer both fit. · Side-by-side outputs of local models (results pages linked in the repo README) ↗

Bouncing Balls Simulation Webgame **Goal:** Create a bouncing ball physics simulations using html, js and css. Utilize the HTML Canvas API for complex rendering, implement moderately complex physics (including gravity, …

The source has no licence that allows copying, so only a short excerpt is shown here. The full prompt is one click away at the source.

How to grade it

Runs in the given boilerplate; at least 30 (target 50+) balls with position, velocity, radius, mass and colour; gravity; energy loss on impact; balls collide with each other and separate instead of sticking; no ball leaves the container; smooth at 60 fps. A good answer uses a spatial grid or something similar to avoid checking every pair.

Scorecard tick what the model got right: 0/7

Runs in your browser; nothing is saved or sent.

0/7

Where models usually fail

Balls stick together or jitter when stacked; balls slowly sink through the floor; no inter-ball collisions at all.

Running it

Made for local models via llama.cpp or KoboldCpp; the repo has a runner and side-by-side result pages.

Source

Author
David Harris (GitHub @electricazimuth)
From
LocalLLM_VisualCodeTest
Exact file or post
https://github.com/electricazimuth/LocalLLM_VisualCodeTest/blob/7e7004885221fafb8b1de360cacc2b8281cf934a/code_prompts/ball_bound.md
Licence
No license file (all rights reserved)
How we use it
Excerpt only: open the full prompt at the source

Testing a local model? Check first whether it fits your hardware with Can I run this LLM?

More in Simulations & physics