# Ask a Game Dev 2023-05-08 19:01:57

Yes, there is a need, but perhaps not in the way you think. Most engineers and system designers need some math knowledge for their day-to-day (I occasionally use vector math and matrices as well as the equations that generate specifically shaped curves), but that sort of thing does not require a mathematician’s expertise. It’s pretty run-of-the-mill ordinary stuff.

No, the mathematician game developer usually stays in the fields of probability and expected value. Many games with randomized elements (especially those that involve monetary transactions, like loot boxes) need mathematical models constructed to produce results within a specific range. If you’ve ever looked at gacha game math, their systems tend to be quite complex under the hood! Let’s take a look at the gacha I’m currently playing, Fire Emblem Heroes.

The way their gacha system works is that there’s usually a base 3% chance to roll a featured gold hero for each banner, and then a base 3% chance on top of that for a random gold hero from the same pool. There’s a 58% chance for a silver hero, and a 36% chance for a bronze hero, summing to 100% total (36 + 58 + 3 + 3 = 100). Calculating expected value from this is introductory probability math. However, there are a number of other confounding factors that get thrown into the mix too. After every 5 non-rare rolls, both the focus and the rare rate increase by 0.25% while the silver and bronze are reduced proportionately. Thus, the more rolls the player fails, the higher the chance of obtaining a rare hero. After 120 non-rare rolls, the next roll is a guaranteed rare hero. How often does this occur? In a game with millions of players rolling dozens of time each, it is bound to occur sometimes.

This is just one way that the math is involved. One feature of the game is that, as new banners arrive, old characters who were exclusive to the rare tier can get demoted to the silver tier, making them much more likely to be summoned (since the chance of silver is a base 58%). Which hero should they demote? What are the chances of obtaining that hero in the silver pool? How much currency should it cost? Suddenly, these sort of additional maths become a lot more complicated. That’s just one probabilistic distribution. What about other ones to keep the players from getting bored?

This is just one system for one game. What should the distribution be for Overwatch skins be if we want players to open roughly X loot boxes to obtain them? How do we build player choice into this distribution such that they can obtain a slight edge by making informed choices, but still remain within the revenue target band? When giving out randomized rewards, how about a currency system to melt down duplicates and use them to obtain what you want? What about “foil” versions of cards like Hearthstone’s, and how do they factor in?

If you think that this sort of work veers very close to gambling, you’d be correct. This is also why slot machine developers hire mathematicians to calculate probabilities and math for features like bonus games, payout tables, etc. If you want to be a mathematician and work on games, that’s the sort of thing you can expect. Not every game needs a mathematician since most games don’t need complicated mathematical models, but this is the sort of feature we hire them for. If this sounds like something you’d be interested in, by all means go for it. If you feel like you’d be more interested in other sorts of tasks, perhaps you would be better served doing something else.

The FANTa Project is currently on hiatus while I am crunching at work too busy.

Got a burning question you want answered?