A downloadable game

Out of curiosity how well LLMs can handle older IT technology, I used claude.ai (Sonnet 4.5 Engine) to write a pong clone in assembler language for the ZX Spectrum.

My first tries were to achieve that directly with assembler (AI-Prompt: "Write me an pong clone in assembler for the ZX Spectrum"), but that never lead to any working results. The game always crashed when started or were a total mess. They never reached any "playable" stage.

So I took a different route, and let the LLM first generate a basic version and (after some minor tuning). After that I asked it to transform the running basic version to assembler and this nearly worked out of the box.

Then I tried to extended this version with a welcome screen and a single player mode (because classic Pong is for 2 human players only) - and here the LLM really surprised me. This quite big development step was achieved in a relativ short series of prompt adjustments and I had a working version in less than 10 Minutes.

The final (and biggest part) was tuning the CPU oponnent and removing some errors in the collision detection.

You can find the ASM-file, my prompt request to Claude.at and the final game (tap-format) in this project page.

I used Google Nano Banana (+some tuning with GIMP/ZX Paintbrush) to generate the title screen which loads on the tap-file.

Not using/knowing Z80-ASM at all, I was impressed what to achive with an LLM having such a small effort.

Published 21 days ago
StatusReleased
Authorhtw8849
GenreAction
TagsArcade

Download

Download
pong_ai.tap 8.6 kB
Download
pong_ai.asm 28 kB
Download
prompt_requests.txt 5.8 kB
Download
pong_ai_basic.tap 1.8 kB

Install instructions

Here is a description of the files in this project:

  • pong_ai.tap - the game + loading screen as a tap-File for ZX Spectrum Emulators
  • pong_ai.asm - the assembler source code generated with Claude.ai
  • prompt_requests.txt - my commands entered to Claude.ai 
  • pong_ai_basic.tap - the basic version the LLM came up with and 

I used "pasmo" to crosscompile the code and "bin2tap" to generate a tap file for the Fuse ZX Spectrum emulator (all under Linux)

Leave a comment

Log in with itch.io to leave a comment.