1. Worldwide Rush
  2. News
  3. Worldwide Rush | Blogpost 7

Worldwide Rush | Blogpost 7

[p]Hi everyone![/p][p][/p][p]There is a lot of happening these days. We have added new game modes, achievements, constant internal playtesting, and, in general, just game improvements. Last Friday I was so overworked that I completely forgot about the blog post. I finished around 9 PM because it was time to take the dog for a walk and put my son to sleep. Once outside, I remembered that the blog post was today. But at that time I was too brain-dead to write something. In my defense, it was a very productive day that brings us closer to a more fun thing than a blog post - the 1.0 release.[/p][p][/p][p]Note, that this is not yet in the demo build.[/p][p][/p][h2]Discover Game Mode[/h2][p][/p][p]Looks like a demo, but you can actually buy other countries. In Discover game mode, you will start with a single country, two cities, and a timer that requires you to buy a new country. If certain destinations reach maximum passenger capacity, then another timer will popup requiring you to resolve that issue. If not, then game over. [/p][p][/p][p][/p][p]Shoutout to Fly Corp and Mini Motorways that inspired this game mode. If you are reading this, then you probably already know about them. It is definitely difficult to balance and find the sweet spot. Can't wait to see you all try it.[/p][p][/p][h2]Sandbox Game Mode[/h2][p][/p][p]Let there be cheats! This is basically the classic game mode with cheats. For those who want to experiment, create scenarios, pit AI against one another, or just play like you would in classic mode with the benefit of changing rules at any time you want. Tools will be added constantly here. It feels like there are always 10 more tools that are fun to have.[/p][p][/p][h2]Achievements[/h2][p][/p][p]In the past week, achievements were added. I am an artist originally, and it was fun working on more high-end graphics for a change. For the programming, it was also fun how to solve massive achievements without using the precious frame time. All vehicles that are locked have an achievement for unlocking them. If you will want the best the game has to offer, then it will be time for achievement hunting. This was definitely the more fun little project. Currently we have 32 achievements.[/p][p][/p][h2]Hub Managers[/h2][p][/p][p]Hub managers are proving more useful as you play. For this reason we are also constantly improving and testing it. What we would like to avoid is having a manager that invalidates the player, but players still were complaining that it only produces planes and ships. Apart from other logic improvements, we added the ability for hub managers to buy roads and rails if the goal is to expand a city. Distances will be short, but now they are much more reliable if left alone. [/p][p][/p][p]Also, for those who are wondering, hub managers actually perform actions only once bought, at the beginning of the month, or when the goal is changed. This big window between updates is because there is not enough data for the manager to make valid choices. When managers start to think, they will evaluate all vehicles in the hub, looking at their performance, destination fulfillment, and travelers. Then, if requirements are met, the selected route will be either upgraded or downgraded. Downgrading can be selling the worst vehicle or downgrading a vehicle by tier. Upgrading can be upgrading a vehicle by tier, upgrading a vehicle by tier and selling another vehicle in the same route to make the higher tier viable, or duplicating the best-performing vehicle.[/p][p][/p][h2]Indirect Traffic[/h2][p][/p][p]We are constantly trying to resolve indirect traffic. How should we help the player, and what information should the game provide? It is the core feature problem that has many different causes and solutions. Solving this problem should be fun and rewarding. That means that we can't provide the answer of what to fix where. AI companies, city-level ups, and destination changes are potential reasons the indirect traffic overcrowds a city.[/p][p][/p][p][/p][p]What we settled for now is an improved destination tooltip. It will show if any company has a direct route. If there is no direct route, then the tooltip will show all companies that have indirect routes that take these passengers. If none of the above is true, then the tooltip searches for potential company routes that would be available if all cities had 0 passengers. If there is such a route, then you will get the potential route that should work and a city that is the problem. Moreover, cities will have overcrowding meters, allowing you to solve this problem before it happens. This alone allows for much faster problem solving.[/p][p][/p][h2]AI Optimizations[/h2][p][/p][p]There are many different optimizations happening, but probably the most interesting one to talk about is AI optimizations. I follow the golden rule: optimize only once there is a problem. The code I write is never rushed, and I keep to my standards, and this is usually enough for the game to run fast. But as the game grows and rules change, some systems start to fall behind in performance. Not because it was written badly, but because requirements were different. Generating saves with AI I noticed, that when playing with 100 different companies, I was unable to fast forward without fps drop on the year 2013, which is not that much of playtime. The problem was mostly AI searching for new investments.[/p][p][/p][p]Now the game is deterministic. This is a requirement for us to make the multiplayer in the future. But different computers have different hardware, and when a host creates 100 AI, some might not keep up. So I decided to offload all AI calculations to the host in the future, and it will simply share commands that AI generates. All others will simply have dummy companies that will only apply commands. This resolves a future problem and opens up numerous potential optimizations. First of which was adding a timer to AI think logic. If it was planning for more than 1 ms, then the game force stops him. This removes determinism for AI, but because only the host will send AI commands, we do not care about that.[/p][p][/p][p]Another problem was that AI was constantly searching for expensive routes. Trying to plan a train from Portugal to Brazil or just inventing its own 60 stop Silk Road. It is definitely cool to see but expensive to have when it is constant and repeated for every company. The fix was to limit how far and for how many stops AI will plan a rail route. Having once checked for straight distance between existing cities and modifying the A* search algorithm to have a max distance was all that was required. Once that was added, multi-stop train planning was cheap, and therefore, I added multi-stop planning for road vehicles and ships to make sure that AI has more chance to find an optimal route. [/p][p][/p][p]Now going past the year 2025 with thousands of vehicles should be possible even with minimum game requirements, as it should be.[/p]