Fun with Theorems – Designing the gameplay for GLASS

Occasionally we discover something fascinating about how the universe works. Occasionally this is in the field of Mathematics. This is the story of how I discovered a remarkable and unintuitive mathematical theorem and leveraging my experience in game design to I transformed this theoretical theorem into a captivating experience accessible to all.. my game Glass.

The Four Colour Theorem

One fateful day I chanced upon the ‘Four Colour Theorem’. It states that any map can have it’s countries coloured with only four colours, so that no country is bordering another of the same colour. It works with maps, and therefore any design you can create.

Yes, this means that if you take a design that requires for colours and make it slightly or even vastly more complicated, it will never, ever require a 5th colour.

This needs 4 colours to fill… easy

Oh no, now I need 5!

Ah, maybe not.

But surely if I…. ah…

If you want to learn more about the ‘Four Colour Theorem’, check out the Wikipedia page. The most important take-away is this: Mathematicians were arguing about this fact from 1852 and it was finally proven once-and-for-all in 1976. The result of their 124 years of labour was to give me a really good game idea, so I wish they could all know that their time wasn’t wasted.

In the 19th century, Augustus De Morgan started the debate with scribbles and doodles in letters to his friends.

The Hidden Magic

So why was I so excited about this theorem as the basis for a game?
I identified it had these special properties:

Filling is fun

People love completing things, whether it’s filling in an adult colouring book or filling in a tricky sudoku puzzle.

No trivial solutions

Filling an empty map / design isn’t achievable with some super-easy system… Whilst colouring the designs doesn’t tend to get really really hard, it isn’t normally obvious either.

Uses human intuition

Computer algorithms to fill a design in four colours rely on brute-force to find the solution, while humans seem to do better in their guessing due to pattern recognition and experience, just like in all the best games, like chess!

Everything is a puzzle

Since literally every design that could ever be created is guaranteed to be fillable in four colours, it makes one thing extremely possible: User-generated content. Mario maker levels have to be completed by their author to prove they are even possible, whereas a game based on this theorem could take any design and know for sure that it could be used.

“Making it harder” experiments

Simply filling the window with a choice of four colours proved to be taxing… It was satisfying but never really hard. There are certainly designs that are harder to complete than others, but there is a hard limit.

I experimented with several ways of making the challenge harder.

Time limits

I experimented with recording the average time that it took to for people to complete each puzzle and either rewarded people for beating it, or told them they had run out of time if they went over.

Pros

The game gets very intense with time limits. Mistakes get made, people get panicked. It’s great for more advanced players.

Cons

It isn’t really the vibe I’m going for. There needs to be a way to enjoy the game in a chilled, relaxed way.

Locked regions

I experimented with having some regions locked on a certain colour.

Pros

It made the game slightly harder, and more importantly it brought some of the difficulty of finding a possible colour to the mid-game. Without locked regions players found themselves only finding difficulty at the end of a puzzle.

Cons

This was tricky to display visually to the player, it took away from the simplicity of the rules. Also, the fixed regions needed to be picked from a known solution to ensure that it was possible to fill the whole thing. I either needed to write an AI to solve each puzzle or have the author solve the puzzle before publishing. This lost the simple magic that the four colour theorem provides me: I don’t need to know the solution to present the empty design as a puzzle.

Color Queue

In this experiment I queued the colour that the user was force to use next, kind of like how Tetris forces you to use a certain piece.

Pros

This made the game significantly harder. It forced the player to look ahead a little and hold a vague plan in their head. This felt like a very good thing since it added more depth and conscious tactics to the game.

Cons

This experiment fell apart at the end of each solve. When a colour was picked randomly, there was a good chance that there was nowhere to place it. I experimented with a “skip” button, which made the mid-game too easy. I also tested only queueing colours that were definitely placeable. This meant that if the player made a mistake, and the final region had all four colours around it, then no colour was possible, so no colour was offered. he game would have to wait for them to break a neighbouring region before it could give you another option. This was confusing to communicate to the player and frustrating to get yourself out of. It almost felt like you were tricking the game into giving you the right colour.

Next Region Locking

The final experiment was forcing the player to fill a certain region, picked randomly one after another. Their only role was to pick colour after colour and it would fill the randomly selected region

Pros

Again, this succeeded in making the gameplay much harder. It forced players to think tactically and plan forward in a very satisfying way. This did not suffer from the same end-game problem as the ‘Colour Queue’ test. If the player makes a mistake and their last region is bordered by all four colours, they will need to pick one colour, which will inevitable knock out out or more of it’s neighbours. The smashed neighbour will then become the next region to fill. It’s simple, not confusing and still only follows one simple rule.

Cons

This is much harder than the other options, and very hard to get started with for new players.

Picking a path

There are some pretty strong cons to most of the “Making it harder” experiments, but I still feel like I need something to increase challenge for more experienced players. The two experiments that had most consistent rules and clearest messaging to the player was “Time limits” and “Locked regions”.

In parallel with these experiments, I have also been considering how many puzzles to give the player. I want to present a few “daily” puzzles which are the same for everyone on that day. “Time limits” is passively enforceable. They could earn extra points for completing in a faster-than-average time. That way experienced players could decide to rush in an attempt to do so, whilst newer players wouldn’t feel the same pressure.

I also want to consider the “Locked regions” mode as either an alternative mode or as a mode for one of the daily puzzles.

Leave a Reply

Your email address will not be published. Required fields are marked *