Ikoni Studio

Search
Close this search box.
Search
Close this search box.

Inside Ikoni: Mathematics!

We will freely share that higher level mathematics have not been a required knowledge base for the development of our games (so far). No need for any calculus, linear algebra, differential equations and so on. Beyond basic arithmetic, the occasional elementary algebra has been all that has been needed. 

However, during the development of Ikoni Word Search there was a very, very unexpected need for geometry and trigonometry! It’s rather amusing because you think after high school (or college) you would never have any use for such math again. Like, how are you ever going to apply trigonometry in real life? Or, when will you have to use geometry to solve for the hypotenuse of triangle as an adult? Well, if you try to build a mobile word search game you’ll soon find out!

Ikoni Word Search’s game board display is built on a grid, a grid made up of 120 identical rectangles.  Each rectangle holds a single letter of the word search puzzle. These rectangles create a challenge: when the player solves for a word diagonally, what angle should the word bubble be displayed at? 

Ikoni Word Search Blog Post

Let’s get into the math by examining an individual rectangle on the game board. Each rectangle can be split diagonally into 2 right triangles. Remember from geometry – a right triangle is a triangle that contains a 90 degree angle. You may also remember from geometry that the sum of the three angles within a triangle equals 180 degrees. Since this is a right triangle, we also know the sum of the other 2 angles equals 90 degrees.

We don’t want to bore you with all the intricate details of the game display, but suffice it to say we know rectangle’s width and height based on the device size. Now beware – even more geometry is incoming! Since we know the height (a) and the width (b) of the triangle, we can now use the Pythagorean Theorem (a2 + b2 = c2) to solve for the hypotenuse (c) of the triangle.

Now that we used geometry and have the length of each side of the triangle (a b and c), we can next use trigonometry to solve for the angles (x and y) inside the triangle.

If you remember, there are three major functions in trigonometry: sine, cosine and tangent. Let’s focus on the tangent function. The tangent function of of an angle is the ratio of the length of the opposite side to that of the adjacent side. That’s a mouth full, so in other words tangent theta equals opposite over adjacent, as shown below:

Now we have everything we need to create the word bubble in the game! We can use the hypotenuse to calculate the length of the word bubble and the tangent formula above to calculate what angle the word bubble should be displayed at. These are the exact steps we preformed to figure out how to display the various word diagonal bubbles in Ikoni Word Search. It was a surprising challenge that this level of mathematics would be needed for the game!

Leave a Reply

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