The Owl Prophecy Game Studio

Circuitous Math Fundamentals

During the first couple months of the game, I struggled to get my designs to align properly. Simple spinners looked fine, but any time I wanted to do a more sophisticated design that required a more precise alignment, it wouldn’t work.

About 8 weeks into the project, I realized my critical error. I had calculated the alignment assuming a straight line through the barriers. One morning I realized since my game is circular (duh!), there was a tiny arc through each of my barriers. But I had no idea how to calculate the distance of that arc. I also knew that distance would vary for each lane. That sent me searching and forced me to learn more about the geometry of circles. It’s possible I learned this in high school, but I don’t remember studying it at this level of detail:

Looking at the diagram was very helpful. I knew the radius in pixels, and I knew the width in pixels of my barriers. I did not, however, have a clue how to calculate the arc. Thankfully, I found this website which really saved me:

The Complete Circular Arc Calculator

I was able to put in the radius and the width, and it gave me the length of the arc for each lane. My first test of the new calculations resulted a perfectly aligned level design:

I was so happy!