Skip to main content

Insider Program

Developer Diary: City Layouts

The Ara: History Untold key art, featuring three leaders made up of different eras of history standing side by side.

Happy Thursday!

It’s the Ara: History Untold team here and today we’re going to talk about Cities! More specifically we’re talking about the techno-babble on how we go about procedurally creating a city that reflects the actions of a player, but also looks like something that could exist in reality.

Let’s face it, while procedural games are immensely fun to play, they can also be immensely complex to develop. Ara: History Untold is especially ambitious because we abandoned the safety of a regular grid and created a truly irregular map, with irregularly shaped regions. We aren’t the first to make irregularly shaped regions, but Ara is unique in that our maps are also procedurally generated.  The challenge here is that we have to teach the computer how to think like an architect.

So how do we even approach this problem? Let’s start by reviewing a couple of our goals. The first is that we need improvements to be visible on the map. That is, when you place a library down, we want you to see that library on the terrain. We want the citizens to react to it and the city to develop around it. The second is that we want the city to reflect the state of the game. This means the number of buildings, the type of buildings, the architecture of the buildings themselves all will reflect what’s going on. We want there to be a difference between Cities and unincorporated regions.  We want the player to know what era a city is in, how many people live there, what culture it is, and some stats like how affluent and happy they are.

To do this, we built a system called the Living World City Renderer (LWCR). It’s a mini program that thinks and reasons like a city planner.  It places roads so they connect the major paths between regions, connects these roads with other roads where appropriate, and removes them if a large improvement needs to be built. It also places buildings near where people need to work and along the roads they need to travel. It places buildings progressively bigger and taller as the population grows. It even creates population density zones just like a city planner might. (And many of these settings will also be exposed to adventurous modders to experiment with!)

For our first Technical Alpha, we concentrated on getting some basic layout into the game, because we needed to have something to visualize the population. We ended up with city patterns that were essentially linear paths leading into the center, such that we could clearly see the units move in and out. As many of you noted after playing this build, this had the negative impact of creating lots of ”pizza cities”, which, while they worked, were far from aesthetically pleasing and also quite repetitive. Our goal was for no two regions to look alike, even if there were some similarities. Ideally, one could look at a screenshot of a city and know exactly which city it was on the map because every city is somewhat unique.

Knowing what our goals were, we worked to create systems that can create a variety of possible layouts that a city could use. We removed the pizza slice sectoring for the game and now use one of a variety of possible structural layouts. These structural layouts are then morphed onto the particular region, with the option of turning secondary roads on/off and adding in tertiary detail roads based on population. With the number of structural templates and the permutations from morphing to regions, every region is likely to have a unique look to it.

The cool thing about these layouts is that they’re actually just data which is somewhat exposed – meaning that an intrepid player could modify a significant amount of how the cities look.  It also means we can continue to add more structural level road networks in the future.

The next big change we made was to change the possible placement of where improvements were. In the first technical alpha, we pizza sliced the improvements in a circle around the center, based on the number of edges a region has. This time, however, the system is far more free form. Instead, it analyzes each region and creates a group of improvement placements that are based on region specific details. The result is a much more dynamic allotment of improvement placements, the number of edges has little to do with the number of possible improvements.

To support coastal improvements, the players will notice that some improvement slots are adjacent to the water. If an improvement is adjacent to the water, it will allow special coastal improvements to be built, such as a lighthouse or a dock. Of course, if the player has built another improvement in that slot, they will not be able to also build a dock, so choose wisely!

Another improvement was to create a special slot for ‘starter’ improvements. It really sucked to have to take an entire improvement slot up when building your totem, for example, and it was a bit odd that it wasn’t given special treatment in the first place. As a result, we created a special slot in the center of a region that’s just for a starter improvement. A starter improvement will usually found a city or a nation, and it’s nice to not waste an entire slot doing that.

Besides the placements of roads and improvements, we also received feedback about cities being more visually distinct. Specifically, it wasn’t visually obvious when a city was created and when that city expanded. Cities are important, but the visualization was based entirely on the population of each region, even if they were not incorporated into a city. This created a city with multiple downtowns, which didn’t reflect reality the way we wanted it to. We’ve since changed this behavior, so residents of the city will tend to live in the city center’s region, and the population will expand outward from that center of the city into the regions directly adjacent to it. This distinguishes proper cities from a collection of unincorporated regions.

Finally, we sought to improve Triumphs. Triumphs are really cool, but they are also really big. So big in fact, during the first Technical Alpha, we often didn’t have room to place one without blocking one of the roads, thus drastically limiting where a Triumph could be placed.  To solve this, we rewarded your citizens with some ingenuity. Your citizens will now place that triumph in the center of a region and route the roads around it.  As a result, Triumphs can be built in most regions, with caveat being you won’t be able to build anything else there because they are just so Triumphant.

With all those changes in mind, here’s a paintover of our current implementation along with some notes for further improvements.

We’re incredibly excited to bring these changes to the next Technical Alpha and are sincerely thankful to our community of Insiders for the input that brought us here. We’ve got plenty of other technical improvements which should enhance some visuals and also increase the performance. We hope you tune in to see our progress early this year during our second Technical Alpha. Thanks again for all the feedback – we’ll continue working hard to make the best possible game we know how to.

-The Ara: History Untold Team