Futurism logo

I moved a 12-year-old game to Auckland

Weekend Projects, episode three: a sliding-tile puzzle reskinned with tūī, jandals and the Sky Tower, and a test that proved the rules never moved.

By Gautam AtmakuriPublished 3 days ago • 3 min read
1

I took a twelve-year-old open-source puzzle game and moved it to Auckland in an afternoon. Same seed, same sixty moves, and the original and my Auckland version both finished on 424 points. The look changed completely. The game didn't change at all, and that was the whole idea.

Weekend Projects is my Monday series about small builds I do at home. This one is lighter than the last two, and honestly a bit sillier, but it taught me more about reading someone else's code than most tutorials have.

You probably know the type. A grid of numbered tiles, you slide them around, matching numbers merge into bigger ones, and you chase the top tile until the board fills up and you lose. The original is plain JavaScript under an MIT licence, with no build step, which makes it a friendly thing to poke at on a weekend.

My twist was to turn every number into a bit of Tāmaki Makaurau. Two is a tūī. Four is a pōhutukawa. After that you climb through a jandal, a bus, a ferry, a pavlova, Rangitoto and the Harbour Bridge, and the top tile is the Sky Tower. Picking the list was the fun part, and I'm still not sure a pavlova deserves to outrank a ferry.

Even the messages got the treatment. Win, and the game tells you "Sweet as! You built the Sky Tower". Lose, and it says "Ah yeah nah, have another go".

Coding tools on my Mac did the heavy lifting. They cloned the repo, kept the licence in place, and made five small commits: a harbour and pōhutukawa colour palette, the Auckland tiles, the Kiwi messages, a skyline, and a seed so I could record the same game twice.

That seed matters more than it sounds. Without it, every game deals different tiles, so you can't compare two versions fairly. With it, I could play the original and the Auckland fork move for move and check the scores. Both landed on 424 after sixty moves. Only the look had moved.

Every icon is drawn in code. No stock art and no logos. The bus is a plain double-decker on purpose, because a transport company's branding isn't mine to borrow, even for a weekend toy.

None of this went perfectly, and the snags were the interesting bit.

First, the longer win message overflowed its box and had to shrink. Both versions also shared saved games in the browser, so a recording could quietly load an old game by accident. That's the sort of bug you'd never spot until you're halfway through filming and the board looks oddly familiar.

Then there was a line on the original page calling itself the official version. On a fork that would be false, so it came out.

After that I had my Windows machine review the whole thing cold, with no context from the first round. It found two layout slips and a small bug, and sent a patch. A second pair of eyes is cheap insurance, even when both pairs of eyes are machines on my desk.

One confession about the video. To reach the Sky Tower on camera, I loaded a late-game save. It's still the real game, just a shortcut, because nobody wants to watch me grind tiles all evening. And the fork runs locally only. It isn't published anywhere.

Mr. Mummu, who wanders into these posts now and then, once decided his front fence needed a new look. He painted every paling a different colour, which the street accepted with good grace. Then he decided the latch spoilt the line of his favourite red paling, so he moved it two palings along. The fence looked lovely. The gate, however, now swung out over the footpath and clipped the neighbour's wheelie bin on rubbish day. He wrote "gate" in his notebook marked "Urgent", underlined it twice, and went to consult the aunties, who ruled within a minute that a gate is not a painting. He moved the latch back that evening and kept every colour. In the notebook, under the underlines, he added one line: paint is free, hinges have opinions.

That's more or less the lesson of this project.

If you want to learn a codebase, localise it. You change the display, you leave the rules alone, and you find out quickly where the two are tangled. Every place my Auckland skin bumped into something (the overflowing message, the shared saves, that official-version line) was a spot where the look and the logic were tied together more tightly than I expected.

Reading code cold is slow. Trying to change one layer and watching what else wobbles is much faster, and a lot more fun when the reward is a little Sky Tower.

The full demo is on my YouTube channel, Gautam Atmakuri, in the Weekend Experiments playlist. I'll pop the link in the comments, with credit to the original game and the person who made it.

techbook reviewhow to
1

About the Creator

Gautam Atmakuri

I once spent seven days blindfolded, silent and without food to see what my senses were hiding. I write about that, my baby boy, barefoot running, Tirupati to Auckland life, and the business, marketing and tech I build at AumnI digital.

Enjoyed the story? Support the Creator.

Subscribe for free to receive all their stories in your feed. You could also become a paid subscriber or give them a one-off tip, letting them know you appreciate their work.

Subscribe For Free

Reader insights

Share your insights about this piece.

How does it work?

Add your insights

Comments (1)

Sign in to comment
  • Janis Masyk-Jackson3 days ago

    I'm really not very familiar with what you're doing here, but it sounds like you really know what you're doing.

Written by Gautam Atmakuri
1