I spent $1.43 building flappy bird

Claude recently released an updated model for Sonnet 3.5. I took it for a test spin.

What’s better?

The upgraded Claude 3.5 Sonnet shows wide-ranging improvements on industry benchmarks. On coding, it improves performance on SWE-bench Verified from 33% to 49%, scoring higher than all publicly available models.

While I love Claude’s artifacts feature, where you can prompt it, and it responds with code that can run inside the same window, copy-pasting that into an editor is a pain.

Unfortunately, its functionality is limited to vanilla javascript, react, and a few other libraries.

But, if you want to get more creative, you need your own environment.

The prototype

I recently learned that Telegram is more than just a chat app, and I wanted to try building a game for it that you can launch through a chatbot.

It was the perfect task to test drive a new setup. I used the CLINE (formerly known as Claude Dev) extension for VSCode. It can modify the code in your project directly and manipulate the terminal to run it. Access to the Claude API will be needed to get it up and running.

I settled on a Flappy Bird clone, which should be fairly easy to implement. After a few iterations and collision detection problems, I had this up and running:

The game was easy to get to a working state. The code generation is fast and on point.

Integrating with the Telegram API, though, was a mixed bag. It could not figure out the properties of calls, so I had to dig manually through the docs to give it precise instructions.

Compared to GitHub Copilot, prototyping like this is on a different level.

Two tips.

Keep the files small, under 400 lines of code. After that, it starts to break, so organize in a smart way to work on more complex projects.

Your prompting skill translates to Claude’s coding skill. The better you can explain your requirements precisely, the better the results that you are going to get.

P.S. The telegram implementation is still too wonky to share, but if you want to test drive the raw HTML game implementation, you can find it here: https://tajpelc.github.io/blog/flappy.html

Yours,

Taj

All writing