Nothing useful in this post, just me rambling with myself while having fun. In the previous post Blazing fast game development using LLMs, I talked about a coding LLM called Codestral. Today I took my time to try the new Qwen Coder 32B from the Chinese tech giant Alibaba. Without pasting lots and lots of code, I wanted to share a couple examples it made.
In the first example I asked for another 2D pygame, this time a planet Earth, the Moon orbiting it, and a player controlled spaceship. The LLM delivered almost coherent code, with the only problem being a mixup with global/local variables and a sprite that rotated in the wrong direction and a request to add sprites, sprites that I shamelessly stole from the web.
As a follow up question I asked to add laser shooting. I ended up having this game.
I didn’t want to delve deeper but you can download the code and sprites here:
Earth and Moon game (9 downloads )In a second test I asked it to make a bullet hell game, feature complete (with a start button and a leaderboard), using a single HTML page, and using simple shapes instead of sprites.
It managed to create one single 300 lines page, which I posted here on Pastebin in case you want to look at it. You can save this code in an html file and run it in your browser.
The game is obliviously boring to look at and boring to play, as an AI it doesn’t need dopamine to have fun, well, it doesn’t have a concept of what fun is. What it game me was some sterile code, doing exactly what I asked it to do, my share of fun was getting this all to work.