1. InfraSpace
  2. News

InfraSpace News

Friday Dev News #84 - Pathfinding for Bigger Maps

Hello everyone!

Today we don't show any new graphics or art concepts, instead we go on a little deep dive on game performance on big maps.

Bigger maps are one of the most common community requests and since we're doing the terraforming update anyways, it's a good point in time to check if they are possible.
There are actually 2 different types of problems to solve:

The first one is just simple simulation performance of production buildings, cars, trains, etc. When we quadruple the map size, we just have to speed up the simulation performance by 400%. Sounds like a lot, but doable.

The other problem is pathfinding performance. This is a lot more difficult since the the time to find a path for a car to take does not grow linearly with performance - it grows a lot faster.

We did our experiments on a city with 100k citizens. This is waaaay more than needed to reach the current endgame, but it's close to the max of what players can fit onto a current InfraSpace map. I have only seen 2 players reach that kind of city size so far.

A 100k city looks like this:





This save game features around 7,000 roads (14,000 road directions to do pathfinding on, since most roads are 2-way), 16.000 buildings and 15,400 active cars - and we want to quadruple that.

Before we look into general game performance, we need to check if we can deal with the pathfinding problem appropriately - otherwise bigger maps won't be possible, period.

In order to simulate bigger cities, we use a simple random road network generator. It's not a perfect recreation of player city networks, but it's a good enough approximation. We can generate road networks of different sizes easily for performance testing:





The green lines are highways.

In order to make pathfinding feasible, we use a 2-step algorithm that preprocesses the road network first to enable lightning fast pathfinding queries later, called contraction hierachies (paper).

With a 100k city, the preprocessing step only takes 11 seconds, that means it takes 11 seconds for cars to take your new road after you placed it - that's good enough for such a huge city.

With a 400k city, the network becomes much more complex to preprocess, taking 225 seconds or almost 4 minutes. That's too long.

While other team members were working on the terrain generation, I focused on some deep optimizing and found a 2-part solution: First we cut down the size of the graph by replacing some stretches of road with simple shortcuts. Then we run a much more optimized version of the contraction hierarchy preprocessing time.

The results for the 100k city look like this:



The 400k city takes a lot longer, but is still in an ok range because this is only for players that push InfraSpace to it's max even when we quadruple the size:



So it seems like we may be able to increase the map size when it comes to pathfinding. There are a lot of other optimizations that need to be done and I'm not sure we'll actually change the size for the terraforming update, but it's good news nonetheless.

I hope you enjoyed the technical deep dive post for a change, and as always, happy playing!





Friday Dev News #83 - Magnetic Field Generator

Hello everyone,

today we're introducing the largest building you need to construct in order to terraform your environment after the terraforming update: The Magnetic Field Generator.

On earth, our magnetic field protects us from solar radiation, but on this planet, there is no natural magnetic field across the whole planet, just small localized fields. In order to make the environment more suitable for life as well as safer for humans, you will be able to construct a large building that consumes tons of electricity and converts it into a large field to keep your city safe.

We only have some art concepts for now, but since you enjoyed voting on the drone, I thought it'd be a good idea to show it to you early and let your feedback influence the design process. Let us know what you think!





On another note, the drones you saw in the last posts have made their way into the game - behold your new autonomous fertilizer distribution system!







Disclaimer: the movement is not programmed yet, but I thought I'd share the art screenshots anyways ;)

Happy playing!

Friday Dev News #82 - Ammonia Extraction

Hello everyone and welcome to another round of progress news on the terraforming update!

First of all, I'd like to show you some progress on the buildings that have already been introduced in a previous post and are now getting integrated into the game.



The ground acidity regulator is a large building that slowly extracts acid from the soil by digging down deep to the subterranean water.



On the left side you can see the drone hub for the fertilizer drones and on the right side you can see the new dust particle filter.

Speaking of drones, thanks for all the feedback to our last post! There have been a lot of different opinions so we decided to combine a bunch of well liked ideas from the previous concepts:



As far as the buildings go, I'd like to introduce you to one more terraforming building: The air purifier extracts ammonia from the atmosphere and releases nitrogen in an effort to make the air on this planet breathable.

The air purifier reaches up high into the atmosphere and covers a big radius.



Also, a small update on the world generation: Our programmer is back on his feet and has been working on the river & highlands shapes, let me show you a visualization:



So, obviously this is just a programming concept with all the art missing, so let me explain what you're seeing: The dried river shape is already pretty nice and cutting into the terrain properly and we can dynamically add more or less curvature to it. The blue outlines show a pattern of voronoi cells which is going to be used to generate interesting looking highland shapes. Basically we select a couple of nearby cells to form a plateau and the resulting shape is more natural looking than other methods.

Finally, I wanted to provide a first guess at when this update is going to be released. The terraforming update is a big one and in my head I'm thinking it could be another month or so of work. *But* multiple team members have planned vacation in August and it's good to have some buffer time, so to be on the safe side, let's expect September. I hope you can stomach the wait and keep letting us know your opinions in the comments!

Happy playing!

Friday Dev News #81 - Terraformed Landscape

Hello everyone!

After announcing the new terraforming feature last week and introducing you to the first couple of terraforming buildings, it's time to introduce you to the new terrain concepts.

These are 3D art concepts of the different biomes and the final version is still open to change.











Don't worry about the height of the grass: we will cut it around buildings and roads to give the city some space.

The fertilzer required for terraforming will be distributed via autonomous drones. Let us know which one you think looks the best!



On another note Ben, the programmer working on the new procedural terrain generation, got sick for most of the week, so we don't have much news there. We wish him a good recovery!

As always,
happy playing!

Friday Dev News #80 - Terraforming

Hello everyone!

Today we're announcing the major feature of the next update besides the new terrain and mod support: Terraforming!

You'll be able to turn the planet's surface into a livable biosphere by changing the plant's environment step by step.

One of these steps is reducing the acidity in the soil. We went through a couple of ideas for this building...



... and in the end focused on a futuristic looking building that combines some of the concepts from before. It processes the and filters soil in a close range next to the building:



We also need to fertilize larger areas and this is where the drone port comes in to spread fertilizer and tend to some of the more inaccessible areas of the map:



Once you've made the planet liveable, there is going to be a variety of different new plants scattered on the surface (don't worry, they will not impede building building placement):



We are still working terraformed map itself as well as more buildings for the terraforming production chain, so stay tuned :)


In other news, it's not enough to just make 3D concepts of the terrain, so we have started work on procedural generation. The dried river is one of the most defining features of the map because of it's size, so that's what we started with:



Our procedural generator allows a variety of different shapes to make the random maps look more natural. It's work in progress, so only representative of the current state we have now not the final look.

And finally I want to thank everyone for the comments and suggestions you leave on these posts and on the forum. We also have bugfixes and performance on our mind of course as well as new features.

As always,
Happy playing!

Note: Steam's News post feature was acting up yesterday, so I was only able to post the Friday Dev News on Saturday here. You can also find Friday Dev News on the InfraSpace forum.