Post news RSS State Of The Game: New Year’s Edition (Part 1)

Part 1 of our State of the Game post discusses the procedural nature of the planet, towns, and buildings for making the world in Imagine Nations. These three parts are crucial to the entire game, we explain how everything works together in this post.

Posted by on

As we’ve been relatively quiet over the past few months, we wanted to get a post out focusing on what has been accomplished over 2014, and what we plan on doing moving forward. This first post will be focusing on the work Alex has been doing since joining the team in June related to the procedural nature of the planet, towns, and buildings. As these three parts are crucial to the entire game, we wanted to explain how everything works in this post (specifically what Alex has been working on and/or recently completed), and the 2nd part of this post will go into the road map for 2015.


From Location to Realization

A large amount of objects goes into generating a fully random world with complex features like towns in, particularly when the goal is to have things appear different every time – terrain, road layouts, buildings and more.

Before getting into how the towns are made, here is a little explanation of the underlying terrain systems is in order.

Like an Onion

Generating all the information that makes a full voxel world is very expensive in terms of computer processing and may take several hours if it was all generated at once. Fortunately, not all of the information is needed for most things, and we can get away with using lower resolution or less precise data.

To that end, terrain generation is set up in layers, each subsequent level having more detail and bringing it closer to the final result. At the lowest level, only the general shapes of the landmasses and seas, and basic height ranges are visible. It is not a whole lot, but plenty for getting a good idea about where you might want to generate a village.

Low Res Town Pictre

An example of the lowest resolution height layer that is used for general shape. This is full size for an entire planet face. This particular image is old, since post engine change it’s harder to output images like this, but it’s extremely similar.

This allows the placement of towns to be planned ahead of building the area it occupies. Right now though, because they’re still heavily in development, a town is placed in the middle of the world area.

Tiles and Keeping them Hidden

The easiest way to build a structured area like a town is with tiles, each containing road and places for buildings. Tiles are easy to keep track of, and easy to work with, but have some drawbacks, mainly concerning how easy they are to spot in the world, especially where they join to other tiles.

This can be mitigated somewhat by making sure you have plenty of different tile variants for each type of tile that exists, so there’s a much smaller chance of getting two that are identical in a row, and by rotation and flipping to get more variants out of a single base image. More on that later.

towns article pic 2

Prototype for testing town layouts, showing two layouts as basic tiles (left) and the first image-based tiles (right).

Random Interior Design

As it turns out, designing the layout of a house is no simple task. The number and types of rooms and how they connect are a very important process. We need to make sure that a randomly generated blob of rooms both looks like a house and makes enough sense to be believable takes a lot of work.

A graph of the connections between rooms is made based on the type and size of structure. The rooms are placed, shuffled around, and expanded within limitations to make (mostly) normal looking structures.

towns article pic 3

Prototype for house generation showing the graph of rooms and their relative placement in the final house, back before doors were added.

After that, the doors and walls are fleshed out as the structure is bound to the block grid. The general features of the rooms like walls, ceilings, and floors are dictated by the room type. You may have seen some of the pictures in the weekly screenshot recaps showing the animal pen rooms as low walled courtyards.

The buildings are then placed into the town tiles to line the roads, which with enough variety can look quite natural.

towns article pic 4

Another town layout prototype pic, this time with a larger pool of different tiles to use with the houses.

Wrapping up

Eventually the houses will have more complex features and decorations, and be filled with the trappings of whoever lives or works there, but for now the focus is on getting them into the world. They’ll be functional places for the townsfolk to operate from, which is an important feature we are working on in the coming months.

Some of the features, particularly world gen and buildings, are currently in the early build available to backers. We’re expecting the town functionality in a build in the near future, and then the focus will be tweaking the current functionality and adding in the citizens.

- The Imagine Nations Team

Get Imagine Nations for $15.00 and gain access to early build and Backer’s Access to private forums for Backer’s Only


nice, keep it up.

Reply Good karma Bad karma+1 vote

I have always found generation of (believable/immersive) towns an interesting topic, thanks for the article. I've been planning to write a town-generation application for the past few years with distinctive living-, shopping- and industrial districts. Do you also plan on having some kind of 'districts' with i.e. several shops grouped together?

Reply Good karma Bad karma+2 votes
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.