Notes

Building Ton Up Cricket Zombies Edition With AI

Forking Ton Up Cricket into a zombie game was quick with AI. Making it fun was the slow part. Here is where AI helps and where it does not.

Building Ton Up Cricket Zombies Edition With AI
Adam Jackson 3 min readaigames

Once Ton Up Cricket was finished, I had a working cricket game and an idea I couldn't shake. What if the crowd turned?

That became Ton Up Cricket Zombies Edition. It's a good example of where AI saves a huge amount of time, and where it saves none at all.

The quick part: forking the game

Zombies Edition started as a fork of Ton Up Cricket. I kept the batting exactly as it was. The fielders and the crowd became zombies, slowly advancing on the batters.

With AI, that first version came together fast. Swapping sprites, adding a horde that moves towards you, counting kills instead of runs. That's the kind of work AI is very good at, because it's mostly about changing code that already works.

It's about 8,000 lines of TypeScript with no game engine. The whole game is 6.9 MB, and most of that is one background video.

The slow part: making it fun

A working version and a fun version are two very different things.

The rules are simple. A four bursts the four zombies closest to you. A six takes six. There's no winning. Your score is how many you put down before you're all out or eaten.

Simple rules are the hardest to get right, because there's nothing to hide behind. How fast does the horde move? How close can they get before it feels hopeless? At what point does a run of dot balls stop being tense and start being annoying? None of that is a coding question. AI can write the code for any answer you choose. It can't tell you which answer is right.

The only way to find out is to play it, again and again, on a phone as well as a computer, and keep adjusting. AI makes each adjustment quicker. It doesn't play the game for you.

Why I think this matters

There's a lot of talk at the moment about AI building whole apps and websites on its own. Some of it is true. You can get something that runs very quickly.

But "runs" is a low bar. The difference between something that runs and something people enjoy using is all in the details, and the details still need a person who knows what good looks like and won't ship until it's there. That's true of a zombie cricket game and it's true of a booking page for a hair salon.

I wrote about where that standard comes from in why a web developer builds games, and there's more on how I use AI in my AI-powered build method.

One button, still

Like the original, everything is one button: a tap, a click or Space. You tap to set your power, tap to freeze the ball as it flies, tap to aim at the horde, then tap in the green band to middle it. Miss it and you edge it.

Keeping the controls the same was a deliberate choice. If you've played Ton Up Cricket, you already know how to play this. All that's changed is what's coming at you.

What came next

Zombies Edition turned out to be a starting point too. Its 16-bit world, sprite pipeline and horde went on to become the base for Padel Z, the padel game I made with my 8-year-old nephew. Reusing good work is one of the quiet advantages of building things properly the first time.

Have a go

Ton Up Cricket Zombies Edition is free in your browser with no login, on your phone or computer. It does have cartoon zombies in it, so bear that in mind with younger players.

If you want something built with the same care, get in touch. I'll convert your existing site to HD CMS for free, then it's £20 a month for hosting and updates.

Related reading

AI for business →