From paper grids to online battles: how AI helped me build maths games for esheets.io

Share
The story behind the games on esheets.io
The story behind the games on esheets.io

The games on esheets.io began with some very old technology: sheets of paper, pencils, dice and two students arguing about whether a move was legal.

Long before I attempted anything resembling an online multiplayer game, I was interested in the classic pen-and-paper games that occasionally appear in maths books, puzzle collections and teacher-training sessions. Many have very simple rules, require almost no equipment and contain far more strategy than their appearance suggests.

My first aim was not particularly ambitious. I wanted to turn some of these games into small browser versions that students could play on a shared iPad or laptop.

Each game was built as a single HTML file, with the HTML, CSS and JavaScript bundled together. There was no database, no login system and no multiplayer server. Two students sat beside each other and passed control of the same device.

That apparent limitation was partly deliberate. Students huddled around one screen still talk, negotiate, gloat and accuse each other of cheating. As a teacher, I am not entirely convinced that every educational activity is improved by placing each child behind a separate device.

Recreating classic strategy games

That early approach gradually produced the collection now found on the ESHEETS Battles page.

Some games are extremely quick. In Teeko, players first place four counters and then move them around the board, trying to create either a line of four or a small square. The rules can be explained in a minute, but the movement phase introduces enough strategy to make repeat games worthwhile.

Neutron is more demanding. Players manoeuvre their own pieces while trying to move a neutral piece—the Neutron—into their home row or trap it so that their opponent cannot move it. It is the sort of game where a move that appears harmless can turn out to have ended the contest several turns later.

Then there is Pig, which has been particularly popular with my students. Players repeatedly roll dice to build a temporary score, but risk losing the entire turn if they roll a single one. They can stop and bank their points at any time.

The arithmetic is straightforward. The real mathematics lies in the decision-making: how much risk is sensible, whether the current score is worth protecting and whether your strategy should change when you are behind. Students rarely describe this as a probability lesson, which is probably part of the reason it works.

Corners takes a different idea. Players place dots and attempt to identify four that form the corners of a square—including squares tilted diagonally across the grid. It is a game of visualisation, spatial reasoning and noticing structures before your opponent does.

These games are not disguised worksheets. Some contain very little formal calculation. What they do encourage is mathematical behaviour: planning, pattern recognition, logical deduction, spatial awareness and adjusting a strategy when the evidence changes.

From paper activity to miniature simulation

The Puzzles section developed alongside the two-player games, although these activities were designed mainly for individual students.

The most successful example has been Zoo Mogul.

The original idea came from a pen-and-paper activity I encountered while training to become a teacher. Students had to plan a zoo while working within a budget. I always liked the premise because it gave money calculations a purpose: the numbers represented decisions rather than isolated exercises.

The browser version gradually became something much more elaborate. Players now build paths, choose animals, add facilities, set ticket prices and attempt to balance income against running costs. Visitor happiness, animal welfare, cleanliness and reputation all affect the outcome.

A zoo containing the most expensive animals is not necessarily a successful zoo. Visitors need to reach the attractions. Toilets and bins matter. Food stalls can generate income while also creating more litter. An impressive expansion can become a financial disaster if the daily costs are ignored.

Zoo Mogul is now the most popular page on my website. That was not something I predicted when I began converting an old teacher-training activity into a browser game. It is also a useful reminder that educational games do not need extraordinary graphics or complicated controls. A strong underlying idea can do most of the heavy lifting.

Another experiment was Escape from Pentades, a graphical maths adventure in which students travel across five islands representing different areas of GCSE mathematics.

It sits somewhere between a revision activity and an old-fashioned adventure game. Students solve mathematical problems to progress, but the questions are part of a larger setting rather than presented as another page of exercises. The graphics are hardly going to trouble a modern games console, but the format creates curiosity: students want to find out who they are going to meet next.

The jump to online multiplayer

For a long time, the shared-device model was enough.

A single browser only needs to maintain one version of the game. It always knows whose turn it is, which moves have been made and whether somebody has won. Even when the code becomes untidy, everything is happening in one place.

Online multiplayer changes that.

Once players are using separate devices, both screens must agree about the state of the game. A move made on one device needs to appear on the other. The game needs some way to place players together, decide who moves first and prevent both players from acting at once. You also have to consider refreshes, abandoned games, invalid moves and what happens when somebody’s connection briefly disappears.

This was where I began using Google Antigravity more seriously. Antigravity is an agentic development platform that can work across a code editor, terminal and browser rather than merely suggesting the next few lines of code.

I used it first to turn Ultimate Noughts and Crosses into a game that could be played remotely.

Ultimate Noughts and Crosses is already more complicated than the ordinary version. It contains nine smaller boards arranged inside one large board, and the square chosen by one player determines which small board the opponent must use next. That made it a useful test: the game has a clear state, strict turn rules and plenty of opportunities for two devices to disagree.

Dandelions followed. In that game, one player places flowers while the other selects wind directions that spread seeds across a grid. The two players have different roles, different controls and different winning conditions, making it another useful multiplayer experiment. Both games can now be played locally on a shared screen or remotely on separate devices.

The process was not a matter of typing “make this multiplayer” and going for a cup of tea.

I had to become much more precise about the rules. Which device is allowed to change the game state? What information needs to be stored? What happens if a move arrives twice? When is a board considered complete? What should a returning player see after refreshing?

The AI could write large amounts of code, investigate bugs and make changes across several files. My job increasingly became defining the behaviour, checking the result and finding the situations neither of us had considered.

That is an important part of learning to work with coding agents. Better code often begins with a better specification.

Inventing Maths Melee

After reproducing classic games and building the first online versions, I became confident enough to attempt something original.

Maths Melee is loosely based on the classroom activity usually known as the Pirate Game. Students answer mathematics questions, earn points and then decide whether to protect what they have or risk it in search of something better.

Correct answers allow players to take an action. They may bank their points safely or uncover a tile that could provide a reward, a penalty or an opportunity to interfere with another player. Shields, thefts, mirrors, swaps and wildcards create enough uncertainty to ensure that the student with the strongest mathematics does not automatically win.

That balance matters. The maths must remain meaningful, but a classroom game becomes fairly dreary if the result is determined solely by who answers the most questions correctly.

The first version supported two to four players sharing one device. The online version allows players to join from separate devices and supports larger games. It involved far more development than the early single-file battles, but it grew directly from them: simple rules first, then interaction, then enough chaos to make students ask for another round.

What the AI contributed—and what it did not

AI coding tools have changed what I can realistically attempt.

I am a maths teacher with previous front-end development experience, not a professional games studio. Before tools such as Antigravity, I could build a standalone browser game, but an online multiplayer system would probably have remained on the list of things I might tackle one day.

The AI reduced the distance between the idea and a working prototype. It could create infrastructure, trace code across files and attempt technical work that would have required me to spend days reading documentation before I could even begin.

It did not decide which games were worth making.

It did not know that Pig would work particularly well with my students, that shared-device play could be more sociable than individual screens, or that an old zoo-budgeting activity deserved to become a miniature management simulation.

It also did not remove the need for testing. AI-generated games can contain rule errors, interface problems and impressive-looking features that are not actually enjoyable. Students remain brutally efficient quality-control testers. They will find the loophole, discover the button that should not be clickable and announce that the game is boring long before a formal test plan reaches the same conclusion.

The most useful combination has been teacher judgement, enough technical understanding to challenge the output, and an AI agent capable of doing much of the implementation work.

A slightly unruly collection

ESHEETS now contains a growing and slightly unruly mixture of two-player battles, one-player puzzles, simulations and multiplayer games.

Some are careful digital versions of established pen-and-paper games. Some are classroom activities that expanded far beyond their original form. Others are experiments that would probably never have existed without AI-assisted development.

They are not intended to compete with commercial video games. Their job is smaller and, for me, more interesting: give students a reason to calculate, plan, take risks, spot patterns and talk about mathematics.

I do not think AI has magically turned me into a game designer. It has, however, made it much easier to discover whether an idea in a teacher’s notebook can become something students genuinely want to play.