AI • Science • Technology • Future

Side Projects

Mathing: A Flow-Driven Math Game

Image from the original article
Featured image: original publisher image. Via original publisher.

A developer built a simple 60-second math game from scratch in a single HTML file. It began as a personal idea, inspired by the popularity of Wordle. After four years of inactivity, it was revived and redesigned for speed and flow. Source: dev.to.

From Inactive Concept to Daily Rivalry

In 2022, the author paid an offshore developer to build a mental math sprint game. The prototype worked, but felt like homework. It was not engaging.

The author archived the project and left it on their hard drive for four years. No one played it, not even the creator.

A few weeks ago, the author returned to the concept. They asked themselves: Why do people play Wordle every morning without thinking, while brain-training apps make me want to close the tab in four seconds?

The answer wasn’t in the math. It was in the friction. The game needed to feel effortless, not like a task.

Designing for Flow: Eliminating the Enter Key

Early prototypes revealed a subtle but critical flaw: the rhythm of play was broken by the Enter key.

When a problem appears—like 14 + 19 = ?—the brain solves it in about 400 milliseconds. Then the user must type the answer, move their finger to the Enter key, and wait for the next equation to appear.

That delay wasn’t testing mental speed. It was testing how fast a thumb could travel across a screen from the number pad to the Enter key.

To create a true flow state, the author removed the Enter key entirely. Every answer is now a single digit from 0 to 9.

Equations still use two-digit numbers—such as 63 ÷ 9 = ? The brain still has to work. But because the answer is always one digit, as soon as the user taps a number, the answer submits and the next equation appears instantly.

There is no Enter key. No backspace. No multi-digit typing. The game becomes a continuous stream of thought, with no interruption between problems.

UI Feedback Without Interruption

Once the Enter key was removed, players began to go faster. Fast enough that standard visual feedback began to interfere with the rhythm.

Image from the original article
original publisher image. Via original publisher. · Source

Switching equations instantly with no transition made it difficult to know whether the last tap had been registered, especially when consecutive problems looked similar.

The solution was a Ghost Cell.

The real equation advances in 0ms. The player’s eyes immediately see the next problem, so there’s no perceptible gap.

A detached layer renders a ghost version of the tapped digit, fading in with a 300ms green or red stroke. This ghost layer appears on top of the answer slot without blocking input or interrupting the flow.

The function showFeedback uses a reflow trick—void elAnswerGhost.offsetWidth;—to ensure that even during rapid tapping, the visual feedback snaps cleanly on every keypress.

This design choice is subtle but powerful. It allows players to maintain a continuous mental rhythm without interruption. The visual feedback is present, but not intrusive. It doesn’t force a pause in thought. Instead, the brain sees the next equation almost immediately after the last one is answered.

Everyone Plays the Same 60 Seconds

A daily game only works if a score of 38 means the same thing to one player as it does to another.

If one player sees 2 + 2 ten times and another sees 72 ÷ 8 ten times, the game loses its meaning. The experience becomes skewed and unfair.

To ensure fairness, the game uses a client-side Linear Congruential Generator (LCG). It’s seeded by the local date string—YYYY-MM-DD.

Every day at midnight, the date string is hashed into a deterministic seed. This seed generates a pool of 300 equations. All players who start the game that day receive the exact same sequence from problem #1 to #60.

There is no database. No server. The entire daily puzzle runs in the browser. This approach eliminates the need for backend infrastructure, which is both cost-effective and scalable. It also ensures that every player experiences the same sequence of problems, regardless of location or device. The game is truly universal—accessible to anyone with a browser, no matter where they are in the world.

Exploits and Fixes

During a recent round, a player named Adam emailed the author with two sharp observations after completing two rounds (scoring 34, then 41).

First, the ‘Mulligan’ exploit: if a player missed the first 10 seconds of the Daily puzzle, they could tap Home or refresh the tab before the 60-second timer ended and replay the exact same daily seed after memorizing the first 15 equations.

Image from the original article
original publisher image. Via original publisher. · Source

Second, a date parsing issue: new Date('2026-10-01') parses as UTC midnight, while new Date(2026, 9, 1) parses as local midnight. This caused a puzzle badge to jump from #47 to #48 five hours before the actual seed changed.

Both issues have been patched. The daily attempt now locks immediately when the clock starts. The epoch is strictly aligned to local midnight. The author thanks players who noticed and reported these bugs—because their feedback wasn’t just technical. It showed how deeply they cared about fairness and integrity in the game.

Live Performance Metrics

Over the past week, the game has collected real player data:

  • Median time from landing page to first equation: 2.0 seconds
  • Average daily score: 24.2 solved
  • Current highest verified human score: 55 solved (95% accuracy)

Players are encouraged to try the game in 60 seconds and share their score in the comments. A score of 30 or above on the first try is notable.

The game is available at mathing.co. No sign-up is needed. Just open the page and begin.

The author has turned the game into a daily morning ritual with their father and daughter. They now share score cards and trash talk in group chats.

This project shows how small design choices—like removing the Enter key—can transform user experience from friction to flow.

It also demonstrates how a simple, no-code, single-file app can become a shared social activity.

For those interested in similar shared experiences, see Sudoku Together, a game built for solo or shared play.

For a different kind of local-first tool, see a local-first markdown editor that stays fast even with large documents.

For a deeper look at how small technical decisions shape user behavior, see a developer’s journey from error to insight.

Mathing is not just a math game. It is a ritual. A shared moment. A daily check-in between family members. The game’s success lies not in its complexity, but in its simplicity—its ability to reduce mental effort and amplify human connection.

Sources & further reading

Featured image: original publisher image. Via original publisher. Image source