Mathematics: The Foundation of Game Design

What constitutes a satisfactory game? There was a time - in a galaxy far, far away - when the best games involved a deck of cards, dice, or a board. Not anymore. Today the most popular games are online computer ones. Often they have a unique storyline, detailed background animation, a customizable avatar, and frequently some form of conflict. The ubiquitous online game - whether well-designed and popular or not - begins with a foundation in math.

“A video game can’t have rules without math,” according to Game Designing, “in the same way that math doesn’t work unless you understand and use the rules. Video games are basically virtual worlds with tons of rules that keep everything running as intended.” Put in simpler terms, math is the cornerstone of every game, and constructing a game that functions as the creator intended would not be possible without it (Resham, 2022).

Movement is fundamental to all online games. It doesn’t matter if it is ancient fighting styles, catchy victory dances, or simply slingshotting an animal, they all require animated movement to be played. Computer programmers - also known as techy mathematicians - create animated characters with code. This code incorporates mathematical calculations. Without math, “it would be impossible to create the characters or environments that appear on screen, let alone make them move or interact with the world around them” (FunTech, 2021). 

What does this mean? In short, it means that all aspects of the games you love rely on math. “Scripting gameplay” requires fairly simplistic math. For example, “Pac-man employs math to decide how the enemy ghosts move, how long they take to regenerate after being eaten” (Tyler, 2022).

On the other hand, game engine architecture is considerably more complex. A game engine - in the simplest of terms - is translation software that allows one to more easily develop a game across different programming languages. According to Graphics Software Engineer Alain Galvan, game engines are made of top-level systems, which typically include application hardware, singletons and middleware. Application hierarchy exhibits the organization of all the applications in a system, Singleton objects are used for logging, driver objects, caching and thread pool, and database connections (Geeks for Geeks). Middleware is “software that provides common services and capabilities to applications outside of what's offered by the operating system” (Red Hat Software, 2018). In other words, a game engine has many complicated but necessary functions; all of which require at least a basic level of mathematics to comprehend and manage. 

There is an adage in software development: A good coder is a lazy coder. This general truth suggests that good coders rely and build upon already successful code. For example, it is common in game development for a developer to simulate code to maintain the (game) engine at runtime. To read and stitch together code written by multiple developers requires a strong understanding of math. In addition to game engine architects, there are also coders who write engines that can essentially run the computations for operations that are needed for the gameplay script. For example, “managing a gun or other weaponry, programming physics to react appropriately, implementing destructible environments, and programming dynamic weather systems that will change depending on the day of the week or month are examples of more complex game mechanics that use math extensively.” (Reshma, Amina, and BYJU'S FutureSchool. 2022)

According to New York University (NYU), "Games have an intrinsic relationship with almost every branch of mathematics." In NYU’s course description for "Math for Game Designers," they highlight the following math topics as critical to creating high-quality video games: vector mathematics, trigonometry, matrix operations, linear algebra, probability, statistics, and noise & fractals. According to NYU, probability, for instance, is an important math discipline if you want to craft any type of randomness within your game (Best Accredited Colleges). The unpredictability of a game is what makes it exciting. Math enables you to generate levels in your game, script gameplay (not limited to events, jumping and walking), animate scenes and characters, program AI to interact with the player, and simulate realistic environments, including water and grass effects (FunTech, 2021).

What does this mean for aspiring game developers or the curious gamer? With a solid foundation of mathematics, you will be able to spend less time looking up additional tools to aid you in your game construction, and instead be able to apply your own knowledge to problem-solving. This will facilitate your ability to create your own games.

Sources: 

Best Accredited Colleges. “How Do Video Game Designers Use Math in Their Careers?” Bestaccreditedcolleges.org, https://bestaccreditedcolleges.org/articles/careers-and-education/how-do-video-game-designers-use-math-in-their-careers.html

FunTech. “How Do Video Game Designers Use Maths in Their Careers?” FunTech Blog, 25 May 2021, https://funtech.co.uk/latest/how-do-video-game-designers-use-maths-in-their-careers.

Galvan, Alain. “Game Engine Architecture.” Alain.xyz, 27 Oct. 2018, https://alain.xyz/blog/game-engine-architecture

Geeks for Geeks. “Singleton Design Pattern: Introduction.” GeeksforGeeks, 1 Sept. 2021, https://www.geeksforgeeks.org/singleton-design-pattern-introduction/

Red Hat Software. “What Is Middleware?” Red Hat - We Make Open Source Technologies for the Enterprise, 21 Mar. 2018, https://www.redhat.com/en/topics/middleware/what-is-middleware.

Reshma, Amina, and BYJU'S FutureSchool. “Does Game Development Require Math?” BYJU'S Future School Blog, 1 July 2022, https://www.byjusfutureschool.com/blog/does-game-development-require-math/.  

Tyler, Dustin. “Intro to Math in Game Development & Programming.” Video Game Design and Development, 25 Aug. 2022, https://www.gamedesigning.org/learn/game-development-math/

 

 

Previous
Previous

The Role of Mathematics in Growing Food

Next
Next

The Role of Mathematics in Cooking