Map Generation Redux

Welcome back! Development is going to start back up some time next week; I also intend to add a development plan to the blog very soon so everybody can see a) what I have left to do for the first alpha, and b) track progress across these. The current intention is for another fortnight of programming, followed by a break, and then a final ‘push’ from around approximately the middle of June to the first release.

In the mean time, to resume blog entries, I’ve had a few requests/questions about the exact map generation mechanics, so I thought I’d start off with an entry on those. If you want a gif of the full process, scroll to the bottom of the entry; otherwise, here’s each step with a little explanation. This was a map with all values (terrain, forest, tectonic activity, rivers etc) on ‘average’. As ever, click a picture to view full-size.

First, a rough outline of the continents and islands is created. The number of initial blocks is dependent upon the terrain value; the higher, the more initial landmasses are created. Some of the clumps of land generate in locations dependent upon previous land, while other areas are placed randomly.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Next, bands of terrain are added. I originally considered having a simulation which included things like rainfall, but then I realized that since I’m not creating the kind of ‘world simulation’ of the sort that DF is (i.e. factors of that sort are important for the player), there was actually no need. Instead, the game creates semi-random ‘bands’ of terrain, starting with tropical areas and then expanding to include desert, savannah, temperate areas, and then taiga/tundra/polar at the edge of the map. The final look of the map looks just as random and varied as a different technique, while this one saves on time and means I’m not adding any functionality into the game which won’t actually have an effect on gameplay (and, if it does one day, I’ll just add it in then). This also ensures that all climate zones should appear on any given map, which will be important for civilizations/species, and – I think – allows for greater variation on smaller landmasses and areas. Desert is ‘zigzagged’ around tropical areas, which ensures a different variation of desert across hemispheres (in this case predominantly in the south) whereas the earlier maps (if you go back and look) simply contain desert as a band above/below tropical.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

After this, the landmass is then expanded and dithered significantly to remove the straight lines of the climate areas shown above. A lot of extra land is added in this stage. Subsequently, forests are added, with a regularity which depends upon the ‘Forest’ variable and different climate zones. Tropical areas get a ton of forest; temperate zones and taiga get some; desert gets very, very rare ‘forest’ areas, and these are actually oases. Also at this stage, one-square ocean areas are removed, since lakes function differently and will be added later in the process when rivers start to appear.

 

 

 

 

 

 

Next up: mountains. Mountain ranges are created, again primarily depending on the ‘Tectonic Activity’ variable but also varying a little according to biome. In the example below, there’s actually unusually few mountain ranges given the ‘average’ value I gave Tectonic Activity in this generation, but it’s still representative of the process. Once mountain ranges exist, they are then broadened, and the height of surrounding areas adjusted appropriately as the land is yanked upwards.

 

 

 

 

 

 

Lastly, volcanoes are added and then rivers are added and connected, all sourced from mountains and terminating in either lakes or the ocean. Both of these are tricky to see in this size, so I suggest zooming in to have a look. Rivers currently only generate from mountains, but I am considering allowing them to generate from high hills which aren’t mountains in the future too.

 

 

 

 

 

 

And, lastly, here’s a gif of the entire process. In a later version once territory and cities and things exist, I will do an equivalent to show how they (and creature settlements) are generated, but since terrain is the focus of the first alpha, I’ve only reflected that here. Next week, I’ll be uploading the development plan, and saying a little bit on each component of the first alpha I’m working on at the moment…

The benefits of invincibility

Today’s blog entry is a pair of screenshots, which show you a ton of what I’ve been working on this past week of nothing-but-coding. This is when I looked at myself in the middle of combat with two enemies (both off-screen to the left), and what kind of information shows up when you do. Until next week, I leave you with some violence I have only survived because the player character is currently (for testing reasons) invincible. Basically, this screenshot should showcase the query function – listing creatures and objects on a square – what querying a creature looks like, and a few recent changes to the UI. There’s also been a ton of work in creating libraries of weapons/materials, the mechanics of wielding weapons/wearing armor and lots of other stuff, but I’ll talk about that next week. I know it needs a bit of fine-tuning, but basically, things are really coming along now. Until next week!

And also a less exciting technical one dealing with equipping weapons, inventory management, etc:

The Secret Lives of Creatures

With a lot of academic work done the past fortnight, blog entries should returned to their regular schedule from here on. Additionally I’ve noted what people said about interest in hearing about the coding side of the game design – at some point (possibly next week) I’m going to produce a long entry with the details of the world generation system along with the options/variables you can alter in the world gen screen. For now, however, covering all the changes to creatures raises the next question – where exactly are they?

The map key has been redone, and offers the best demonstration of this. Intelligent creatures are located in settlements of a type unique to their species. Each letter for each settlement relates to the creature – ‘C’ for Cyclopes, ‘F’ for Fiends, ‘l’ for Lizardmen, ‘M’ for Minotaurs, ‘N’ for Nagas, ‘O’ for Ogres, ‘o’ for Orcs and ‘U’ for the Undead. Hence:

I don’t know how many of these will be programmed in for the first alpha. Cyclops Homesteads will definitely exist; they have already received a fair bit of work. I may also add in a few of the more unusual ones, but leave them devoid of creatures for now – you may be able to stumble onto labyrinths and necropoles but they won’t be occupied just yet. Well… maybe you’ll be able to find one Minotaur or so. Screenshots of these locations will come at a later date once I’ve done more work on them (creating and improving creature handling is currently taking up most of my coding time).

Additionally, I’d like to have some Shrines in the initial alpha (though, again, currently deactivated). The generation of deities is going to be semi-random; there’s a set list of potential god names and what they are worshiped by/what they represent, but the rituals/shrines associated with each one, and their particular personalities, will be generated anew each time. Additionally, only a selection of the potential gods will exist in any game. Nevertheless, shrines should vary significantly and there will be a few in the initial alpha, along with a few ruins too. Both of these may be infested with wild creatures, of course, so consider that a warning.

In the mean time, I’ve been working on how intelligent creature settlements fit into empires, territories, etc. As monsters do not group into full civilizations, their settlements are comparatively uncertain/short-lived things that won’t have anywhere near as much history behind them as any humanoid civilizations. Humanoid civilizations are generally unwilling to consider monsters as part of the empire, but will employ them as mercenaries and the like; therefore monster settlements either appear on the edge of a civilization and (rarely) are considered part of it; or, more often, they will be just outside a civilization’s territory. Some, of course – like Fiends and the Undead – will never, ever be part of a civilization.

Probably.

The end of the world

So, without further ado, world generation is finished (minor bugs to ironed out in the few days aside). This obviously doesn’t include cities, towns and things of that sort, but the natural parts of the overworld – mountains, rivers, coasts, hills, forests, volcanoes, and the rest of it – all now generate themselves correctly, and fully, at the start of any game. Here are some screenshots of some of the sections I haven’t shown before, which have been finished off this week:

Rare oases in the desert, standing atop a dune:

Climbing a mountain:

…and nearly killing myself in the boiling lava below:

Next week: Monsters redux.

Winter Screenshot Update

Here’s the Winter Screenshot Update! These should give you all an idea of how far world generation has come along, and that I’m now nearing the end of designing the world. It hopefully shouldn’t be too much more than a week until all the mountains, rivers and volcanoes are finished, and I can move back onto programming combat. Additionally, all of these have been added to the totally redone ‘About & Screenshots‘ page! Let me know what you think of the new screenshots, and the new page, and generally how things are looking. Hope everyone has a good new year!

Minimap showing the world map, and the height map.

The key to icons on the minimap.

Going down to the coast in the jungle...

The polar regions of Ultima Ratio Regum.

A fast-flowing river; an ideal place for a civilization to spring up...