Designing Weather Systems To Accurately Simulate Weather Across Different Cities In a Video Game

How you can create city-specific weather conditions in a Business Simulation Game that is close to the real thing.

By Kunal Oogorah, founder Visionaries FZ LLC, an Indie Studio that creates business simulation games that inspire, entertain, and educate. Currently working on Business Heroes: Food Truck Simulation.

My team and I recently implemented what we think is a unique weather system in our upcoming game, and I decided to share it to get some feedback.

The game is a single & multiplayer, turn-based food truck simulation game. The goal is for players to fulfill their entrepreneurial dreams by growing a successful food truck company that sells burgers and drinks. Players begin by choosing a capital city to play in. Then, armed with a single food cart, they start growing their business.

Each city has unique weather conditions. To succeed, players must, among other things, grow their business by making smart decisions based on weather and economic conditions prevalent in their chosen city. We want our players to leave the game with a clear understanding of weather forecasting’s impact on growing their business.

Challenge

Since the game will include several major cities worldwide, we had to design a weather system that accurately simulates each city’s weather. This simulation will significantly impact player experience and game difficulty depending on the city they chose to run their business.

City-Specific Weather Simulation (Playing in Ottawa, Canada is harder than playing in Brasilia, Brazil)

Solution

Our initial approach to designing the weather system was to implement a replica of historical weather conditions in those cities. However, this method would pose a problem with replayability, and players would eventually find the data source we use. Because the game will have a leaderboard, players finding this data would have an unfair advantage, so we decided to discard this idea.

Our second approach, which we settled for, uses the normal distribution and the average temperature and precipitation value of a particular location to generate the weather condition. We think this method strikes the right balance between fun and computing requirements. For example, let’s take Washington DC as a case study.

Below is the actual data for Washington DC:

Average Temperature and Precipitation Data in Washington DC

By taking the average temperature as mean, and using a standard deviation of one, we randomly generated the temperature to fit within the high and low range. We found the Box–Muller transform particularly useful in implementing this. This method helped us account for the rare occurrence of a very high or very low temperature, which happens in reality. Similarly, for the precipitation, we used the average as mean and a standard deviation of two to generate the amount of rain, which directs the cloud volume.

Temperature Distribution
Precipitation Distribution

Outcome

There is a clear jump when moving from month to month. We decided the solution to this would be to pick weekly averages instead of monthly averages. With that, it works as we intended.

Below is a yearly temperature simulation for Washington DC for the morning, afternoon, and evening.

Temperature Simulation

The simulation for the rain/cloud below is for the mornings in Washington DC only. As you can see, most mornings there is a light shower or an overcast, followed by sunny conditions and light rain.

Precipitation Simulation

Impact on the game

The presence of rain and snow reduce the outdoor population in the game, thus reducing the number of sales possible during the period, just like in real life. The reduction of the outdoor population is relative to the amount of rainfall and current temperature. The players can invest in purchasing upgrades to negate some of the bad weather. However, it might not be a profitable investment if your chosen customer segment is not big enough.

What will differentiate outstanding players from mediocre ones, in this case, would be strategic thinking and astute decision making.

Suggestions and improvements

We are welcome to your suggestions on how we can improve the weather simulation system and would love to hear your thoughts.

To discover how we implemented other game mechanics in Business Heroes: Food Truck Simulation, please hit the follow button on our medium profile or subscribe to our newsletter.

You can also join our community on discord by clicking here.

Inspiring entrepreneurship, providing entertainment, & creating a better world through business simulation games. Upcoming: https://businessheroes.cool