Turn a sketch into a browser game with LongCat 2.5
A piece of toast, three spikes, a blue star and a flag were enough to describe a small platform game. Here’s how to send the picture, play the first build and test a change to its rules.
Video in English
Watch on YouTube ↗Connect before sending the drawing
Open the LongCat API platform, sign in, choose API Keys and create a key for the project. Copy it to a private environment variable on your computer. Use the Python example from the Quick Start to select the current endpoint and model. A text-only request with the instruction “Reply with READY only” checks your connection before you send the larger image request.
Give the drawing a rulebook
Sketch the character, hazards, collectible and finish line so each has a distinct shape. Attach the image and describe what the player controls and what counts as a win. For this test I asked for one self-contained HTML file with inline code, a Start button, a single jump and three separate spikes. The first version let the player collect the star for a bonus.
Play both ways
Save the HTML response as a file and open it in a browser. Jump over the spikes and reach the flag once with the star and once without it. Then change one instruction: the player must collect the star before finishing. Try both routes again. One attempted fix stopped the character from moving. I sent that specific symptom back, then replayed the same routes to check the repair.
Read the cost of the whole run
Five requests used about 98,000 tokens in total, including a response that cut off and the repair. The estimate for this run was about US$0.06. For your own project, count retries and use the price shown for your account. The links below also open LongCat’s configuration guides for Claude Code and Codex.
The takeaway
A small change you can test twice makes the game easier to judge. Keep a working copy of the first version so you can replay the exact same jumps after each edit.
About this article and its sources
The gameplay shown comes from the saved HTML builds. The final section follows LongCat’s published setup guides for two coding tools. The token count and cost estimate describe this example.
