Posts In:

Greetings, 👋

It’s great to catch up with you again this Friday. 🤩 We thought to take you behind the scenes to show you how we designed the game’s weather system. We really go into some detail on this one, so settle in. 🛋️

As you know, there are several major cities in the game. To improve the player experience and game difficulty,🤪we had to ensure that each city’s in-game weather mirrors the historical weather conditions of their real-life counterpart.

Getting this right was quite the challenge. 😅

We first tried to implement a replica of historical weather conditions in each city. But we quickly realized this would pose a problem with replayability as players would eventually find our data source 😨 and have an unfair advantage on the leaderboards.

So we decided to discard this method. 🚮

Our second and final approach was to use the normal distribution and the average values of temperature and precipitation in a city to generate the weather condition. For example, let’s take Washington DC as a case study.

Below is the real data for Washington DC:

By taking the average temperature as a mean and using a standard deviation of one, we randomly generated the temperature to fit within the high and low ranges. The Box–Muller transform was particularly useful here.

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 a mean and a standard deviation of two to generate the amount of rain 🌧️, which directs the cloud volume. ☁️

You can observe a clear jump ⬆️ in averages as we move from month to month, which shouldn’t be so. To resolve this, we employed weekly peak averages instead of monthly, which made it work as intended.

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

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

We think this method strikes the right balance between fun 🕺💃 and computing requirements. 💻

The presence of rain ☔ and snow 🌨️ reduces the outdoor population in the game, thus reducing the number of sales possible during the period, just like in real life. You can always invest in upgrades to reduce the impact of weather on your business.

However, it might not be a profitable investment if your chosen customer segment is not big enough. It will take strategic thinking 🤔 and astute decision-making to discern the best time for an investment.

That’s it for today, Cheers 🥂

Don’t forget to Wishlist the game if you haven’t: https://store.steampowered.com/app/1429080/Business_Heroes_Food_Truck_Simulation/

Live Long and Prosper 👋,
Kunal & the team

Follow For More

Greetings, 👋

It’s a lovely Friday in September, and you know we’ve got your update ready. This episode is about how we adjusted the pathing system to make customers move more efficiently to a food stand. Since we are using a 2D environment and handling thousands of city residents, this problem was slightly more challenging.

After a customer collides with the stand range and decides to buy a burger, they are assigned a queue point near the stand, and they proceed to that queue point.

In the image below:
– The stand is in red, and the stand range is in transparent red.
– The person’s path is in blue, and their path’s intersection points (where they can change their direction) are the green squares.
– The decision point in yellow is where they collide with the stand range and decide whether to buy a burger or not.

Previously, after colliding with the stand range, they would first head to the next path intersection point on their preset path before proceeding to their queue spot near the stand. This resulted in an inefficient movement along the yellow arrow to their queue spot, as shown below:

We wanted them to follow the shortest path to their queue spot from any intersection point. Like below:

To do this, we had to implement a path-finding system for everyone using a graph structure and Dijkstra’s algorithm, an algorithm for finding the shortest paths between specified points.

Now customers can find the shortest path to a food stand from any point in their journey across a location.

That’s it for today, Cheers 🥂

Don’t forget to Wishlist the game if you haven’t: https://store.steampowered.com/app/1429080/Business_Heroes_Food_Truck_Simulation/

Live Long and Prosper 👋,
Kunal & the team

 

Follow For More