LLM Learning Roadmap
✨ Awesome-Anything
🖼️ Digital Image Processing
🍃 LLM Components
🌱 LLM Pre-training
☘️ LLM Post-Training
🍀 LLM Popular Models
🪴 LLM Applications
🌿 LLM Optimization
🌾 LLM Compression
🌵 LLM Hands-on Practice
🌴 LLM Must-read Papers
🌳 LLM Q&A
🐝 VLM Image Encoders
📝 MISC.
⏳Claude Sonnet 4 Test with Sandtris
Testing AI Models on Building a Sandtris Web Game: Claude Sonnet 4 vs Gemini 2.5 Pro vs ChatGPT o4-Mini-High
The generative AI race has heated up in 2025, with increasingly capable models from Anthropic, Google, and OpenAI pushing the boundaries of what’s possible in code generation. To see how these models stack up in a creative, technically challenging task, I set out to build a simple browser-based Sandtris game (think: falling sand meets Tetris) — and asked three leading models to help: Claude Sonnet 4, Gemini 1.5 Pro, and ChatGPT-4 Mini-High.
The Challenge
The task was to develop a Sandtris game — a minimalist web game where pixel-based particles/sands fall and interact with each other, within a Tetris-like shape-filling gameplay. Requirements:
- A playable UI in the browser
- Basic physics for falling sand
- Interactive controls (drop pieces, rotate)
I asked each model to implement this game based on a simple, even unpolished instruction with an additional image
Instruction: Can you reproduce the front end and game on the website? You should implement this game in just a single HTML file. This game is called sandtris, which means tetrominoes in the Tetris become sand after they land on the ground. So you should increase the resolutions of tetrominos, so each tetromino can fall apart on the ground. Also, you should simulate the physical reactions between sands.
The uploaded image is from this website as shown below.

Claude Sonnet 4
I started with Claude Sonnet 4, full of high expectations — but ended up disappointed. The initial version it produced didn’t even run properly. While the UI looked decent, the gameplay was broken: the falling speed was painfully slow (the down key is pressed to accelerate already), tetrominoes collided awkwardly against the left wall, and their colors changed unpredictably.
After this, I further instruct it to make some changes with still simple prompt (I do the same for all tested models)
Instruction: everything is not right, especially when the tetrominos fall down on the ground, everything is draged to the left wall and the color is wrong from then
It seemed like Claude understood what was going wrong and began refining the code, eventually leading to the result below.
Well, the tetrominoes no longer crash into the left wall — but the colors are still off, and the falling speed remains sluggish. Maybe this model just cannot do well under simple and sloppy prompts.
Here is its code
v1
v2
ChatGPT 4o-Mini-High
OpenAI’s 4o-mini-high model wasn’t bad at all. It produced a minimal but functional demo right from the start. The falling speed felt much more natural, though the UI was fairly basic, and the tetrominoes didn’t quite resemble actual “sand” particles.
Next, I asked it to improve the game further, aiming for a more realistic sand effect by increasing the resolution of the particles.
Instruction: Well it works fine that at least you simulate the physics reactions. but the tetrominoes should be in a more nuanced resolutions so we can actually call them sands.
However, this time it introduced some bugs, and the game wouldn’t even start, resulting in the state shown below.

The code is attached
v1
v2
Gemini 2.5 Pro
Google’s Gemini 2.5 Pro stood out for its accuracy. From the same simple prompt I used with the other models, it generated solid, runnable code that was largely free of bugs.
- Its physics engine was the most robust of the three, handling particle interactions with realistic cascading effects.
- It accurately reproduced the UI from my uploaded image, even ads...
- The performance was smooth, with a decent falling speed.
- We even have a “start” option
The only downsides were:
- It initialized the game with three sand piles already fallen (like in the image, maybe it cannot tell if it’s intended or not).
- The tetrominoes didn’t cancel each other out upon contact.
Perhaps the model simply didn’t understand how the cancellation mechanic was supposed to work, so I provided more specific instructions.
Instruction: close enough, you should set a rule to make them clear out: when the same color can connect each other from the left wall to the right wall, then this connected area of this color got cleared out
Impressively, it became highly playable after the adjustments!
The code is attached here as well
v1
v2
Conclusion
So yeah — out of the three, Google’s Gemini 2.5 Pro ended up performing the best. It was actually the only one that delivered a solid, playable version of the game by the end.
Of course, this is just one test — and to be honest, I’ve been a bit obsessed with this game lately. With a more detailed prompt or a different angle, the results could totally change. Maybe Gemini just got lucky. Maybe it’s secretly been trained on Sandtris. Maybe Claude 4 works better with Cursor? Maybe Opus 4 is better. I don’t know. Anyway, this was a fun little experiment, and I’m glad to share it with you.
Prev
OpenAI ChatGPT Progression
Next
What DeepSeek-R1's Surge Teaches Us About SEO
Loading...