Original Post — Direct link
3 days ago - UbiCecce - Direct link

Not long ago we gave you a first look at how we’re handling roads in Anno 117: Pax Romana and how we improved the grid with additional functionality by allowing for diagonal building of roads and buildings. If you missed it, catch up by following this link.

In today’s blog, we’ll be looking at the challenges the team faced when making the game work with these new options and how they resolved them.

We’ll also cover a few further implications of these changes, since roads aren’t the only thing you’ll build in Anno 117: Pax Romana, of course.

A quick recap

For Anno 117: Pax Romana, we upgraded the building grid with additional functionality to allow for diagonal roads and buildings. For this, we sub-divided each grid tile into 4-subtiles, which allows us to still calculate and place objects precisely into the grid even at a 45° angle.

Building diagonally does help making both streets and anything connected to them look significantly more organic and changes the look and feel of your cities, production areas and the islands overall.

Despite these new options, our focus was to still make building roads as straightforward and simple as before, where a few clicks connect two points on the island no matter how they are orientated on the grid and where buildings snap to the roads automatically when placed nearby.

The challenges

Now, let’s dive a bit deeper into what we did to get there.

There are a few different ways to bring more flexibility into a builder game like ours, and before the project went into production, we made a prototype and tested all possibilities (all angles allowed, only 45° angles allowed, different rasterizations, different connectivity logics). The most drastic would’ve been to completely remove the grid. A clear disadvantage, however, would have been that it would have become almost impossible to play “Anno-Tetris”. Like playing Tetris without a grid, it would have felt rather strange and unsatisfying and not really like an Anno game anymore.

Once we had found a solution that seemed like it would benefit the game, we went with it.

Let’s cover a few more topics that we had to work on due to the upgrade of the traditional Anno grid:

If you build a road from point A to point B, the game has to suggest a path for the road to take – but diagonal roads mean far more potential paths for the roads. In Anno 1800 a street in an open field has only two options: It can either go first vertical and then horizontal or first horizontal and then vertical. In Anno 117, there is also the option to go first in diagonal or to end in diagonal. More options are cool, but it can be tricky to know what to use when we build streets.

We experimented a bit on this topic, trying different solutions. At first, we tried to guess the intent of the player. Depending on the mouse movements we tried to guess if the player wanted to go first diagonal, or have a 90° angle, or finish in diagonal. In practice it was not reliable enough and the player had to manually change the orientation of the street.

After a lot of tweaking and experimenting, we’ve decided to try a much simpler solution: to always first use a diagonal street and then end with a vertical or horizontal one for the second segment. Sometimes the simpler solutions are the best.

And of course, if there are buildings in between, the street will automatically avoid them.

Farm fields were also adjusted to work in this new context, now able to fill gaps that aren’t the size of a full tile. This is done via a polygon tool that can take full advantage of the sub-tiles we described in the first blog. You probably already spotted this on previous screenshots, but let’s take another look:

The wider impact

We’ve only talked about roads so far but of course any changes to the grid system also impact everything else you build – from houses over ornaments to the mentioned farm fields.

It’s also important to go back to a point from earlier and state that while these changes will turn your cities into significantly more beautiful creations, the efficiency-focused builders among you will probably appreciate to know: Yes, you are losing more space by building diagonally, for a few different reasons.

Firstly – and that’s a lesson from the Anno 1800 days: building beautiful always means “wasting” precious grids that could be used for more residences or more production buildings. Making full use of the new flexibility with diagonal roads and buildings is very much a feature aimed at players who prefer a more organic look for their cities.

Also, we are actually changing the “logical scale” of objects upon rotation. Why and how? Well, let us explain:

Since the single tiles of the old 90 degrees grid are now divided into 4 sub-tiles each, we have to make buildings fit this more detailed grid-structure when turning them by 45 degrees. This can mean slightly increasing or decreasing their size – whatever value in the grid is closer. That, however, doesn’t mean that the building itself, the house (the “mesh”) changes in size, but that the space it occupies/blocks gets larger. Its groundplane (i.e. the ground the building/ornament is placed on) automatically adjusts to make sure there aren’t any weird gaps or overlaps.

Let’s make it a bit easier by visualizing what happens on rotation in our grid:

As you can see, the objects, after being rotated, do not align with the sub-tiles and have to be adjusted first to fit the grid. Of the two options, the one closest in terms of blocked area is chosen. The side length of the 1×1 object changing so much here was one of the reasons we opted for a separate solution for the farm fields, as mentioned previously.

Even if the blocked area increases, the building itself stays the same size. Below you can see what the potential impact of the rotation and scaling can look like. These are just examples for visualization, there are no 1×1 houses 😉

As you can see here, the mesh always remains the same size, even if we have to block more space to make the object in question fit into the grid. 

Non-square buildings are handled in the same way, of course, and depending on the building the blocked area might be bigger or smaller compared to it being built in the traditional grid layout. 

Additionally, we also opted to slightly increase the width of streets (visually) so that they’re a bit wider than a single grid. With both these solutions we avoid what we had internally started calling the “green gap”. 

On average, taking advantage of the diagonal option means that you will use slightly more space.

And when we’re already talking buildings: Let’s not forget a key aspect of Anno’s city building – connecting all your buildings with roads! Production buildings don’t function, and residences don’t get their needs fulfilled if they aren’t connected to a road.

In Anno 1800, at least one road tile had to connect to the building with one of its edges. Simply being in proximity and passing by the building would not count.

In Anno 117: Pax Romana, however, with the option of diagonal roads, we are suddenly faced with more ways in which roads and buildings could interact. For example, a road can just pass by one corner of the building – do we still count it as connected?

The answer is: yes, we do. The game will also help visualize this connection by adding a little cosmetic connection between road and building (marked in blue below). This way something like the below is possible, if you so desire:

As you can see, only 45° angles count for the road connection. 90° connection as in the example on the left side, still are not possible.

Well, that concludes our two-part series on the grid in Anno 117: Pax Romana! 

We hope this not only calms anyone who was worried that we’re getting rid of the grid, but also gave everyone who enjoys a little bit of a look behind the scenes some insights into our processes and the sometimes-unexpected challenges when doing changes to something so central like the grid. 

Please let us know if you liked these kind of development deep-dives and leave any open questions you might still have for us on our social channels, Discord or Reddit, so we can address them later.  

You can also expect to see the new diagonal building options in action later on in videos and livestreams. Until then: have a fantastic Friday!

Der Beitrag DevBlog: Roads & building in the grid erschien zuerst auf Anno Union.

Originally posted by Knodsil

These devblogs are amazing and I'd like to thank the entire dev team for doing such an amazing job!

I wish all game developers could be as open, transparent and communicative as the Anno team.

Very happy to hear you're enjoying these blogs!

They take some time to put together, with input from different departments and dedicated visuals to explain things (like in these recent blogs), so, we're glad they're so well-received.