Back to the blog
Development / DEVELOPMENT NOTES

Simon JS: memory, colours, and JavaScript

A JavaScript version of Simon: watch the sequence, repeat it, and give your memory one more step to remember.

Simon JS game board

Simon JS is a version of the Simon memory game written in JavaScript, without a UI framework. The rule is simple: watch a sequence of colours and sounds, then reproduce it in the same order.

A rule that grows with every round

When the player completes the sequence, the game adds another random element. Play continues until a mistake is made.

Simon JS game board

Separate playback from the response

It helps to distinguish two phases when following the program: the game presents the sequence, then waits for the player’s actions. Checking the response one step at a time lets the game detect a mistake as soon as it happens.

The repository shows the transition between presenting, waiting, and checking. For another experiment, explore the 2D game engine.

Source code

Explore the project on GitHub

Written by Sergio Soriano

Development, curiosity, and shared projects.

About Sergio Soriano