Controls:

  • Arrow Keys: scroll through options
  • Spacebar/Enter: select current option/button
  • 1,2,3: select the leftmost, center, or rightmost grid choice, respectively
  • l (lowercase L): load preset reference grids
  • s: save current reference grids as presets
  • r: revert to default presets
  • a: turn preset autoloading on/off
  • b: toggle DCT coefficient selection bar

How to Play:

Your goal is to determine which of the 3 "Grid Choices" is the true grid by comparing them to a set of up to 6 "Reference Grids." You can select your grid choice with either the arrow keys and enter/spacebar or by typing the number 1, 2, or 3 (representing the order starting from the left).


Behind the scenes, the reference grids are created by (1) converting the true grid to its discrete cosine transform (DCT - a way of breaking an image [or other data points] down into frequency components that is commonly used in image compression and signal processing), (2) selecting a target frequency within the DCT matrix, (3) applying a scaling factor to decrease the coefficients for other frequencies based on how "far" they are from the selected frequency, and (4) converting the DCT matrix back into a viewable grid.

While you're playing, though, you mainly just need to worry about part (2), as you can select the starting/target frequencies using the DCT coefficient selection bar, or load a set of default reference grids either with the "Load Preset Freqs" button (shortcut: l [lowercase L]) or by turning on "Autoload Presets" (shortcut: a), which will automatically load the preset reference grids at the start of each round. When you are starting out, I'd recommend autoloading the default presets until you get a hang for the game, at which point you might want to start exploring custom reference grid selections. Ideally, playing this game will help you develop a sense for how different frequency components can fit together to form an image, which in turn can help you gain a more intuitive understanding of the DCT and its usage in compression and signal processing.

If you want to try out the DCT coefficient selection bar, note that it ranges from 0 to 63 (representing the 8x8 DCT matrix in row-column order, so the 2nd row, 3rd column would be (2-1)x8 + (3-1) = 8 + 2 = 10). Numbers closer to 63 will accentuate higher vertical frequencies than numbers closer to 0, while the horizontal frequencies are affected by the distance from the most recent multiple of 8 (playing around with selecting some reference grids will help you get a feel for it).


Note that you can overwrite the preset grids that can be autoloaded with the grids currently in use by using the "Save New Presets" button (shortcut: s), and, if you change your mind, you can then overwrite the preset grids back to the defaults using the "Revert Presets" button (shortcut: r).

Also, note that if you load preset reference grids when you already have a few reference grids selected, the reference grids that are already filled in will not be overwritten by the presets. Rather, as many presets will be loaded into the available, blank squares as can be until 6 total reference grids are displayed.

For a better experience, I'd recommend using full screen mode.

Levels and Scoring:

There are 5 levels, with the difficulty scaling up with each new level by making the "Grid Choices" tend to be increasingly similar (the higher levels are quite difficult). To advance to the next level, you need to correctly guess the true grid 5 times in a row. The number of correct guesses in a row you currently have is shown by "Level Win Streak" and will reset to 0 if you guess incorrectly.


For the scoring, every time you correctly guess a grid, you get points added to your score based on the following formula:

(10 - [2 x (number of reference grids used beyond 3)]) x level

When you guess incorrectly, your score is reset to whatever it was when you completed the prior level (or to 0 if you are on Level 1).

Don't worry too much about the score starting out - just try to get a feel for the game and complete the levels.

Source Code:

Available at: https://github.com/sacrificialprawn/frequensee_game

Note that this game was created for the GitHub Game Off 2023, and the adherence to the theme of "scale" is indicated in the bolded references to scaling above.

Leave a comment

Log in with itch.io to leave a comment.