Game Update: Advanced Frequency Counter

Today I furthered the development of my game, specifically Level 2 of my game. I did this by coding one of the tools which the player will use to crack the cipher: the advanced frequency counter.

The key alphabet cipher, like the caesar shift, can be solved using frequency analysis. However, simply knowing one letter isn’t enough. One must be able to identify every letter in the key, meaning they have to know the frequencies of multiple letters, which is why an advanced frequency counter is required.

The advanced frequency counter tells you the 3 most common letters in the ciphertext when you click on it. You can then use this knowledge, as well as some inferences from the ciphertext, to decipher the most frequent consonants and vowels, which will give away a large part of the text.

Coding the advanced frequency counter was fairly easy. In React, the framework I’m using, you can make reusable components that can be inserted into other components, which is how I developed most of my game. The original frequency counter was one of these components. I simply created another component that was extremely similar to the frequency counter. The original frequency counter makes use of a lump of code to find the most common letter; in essence, I used a loop to repeat this lump of code 3 times.

Look forward to more progress updates in the future!

Leave a Reply

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