World generation in progress. I spent some time, and made the first steps towards in-game world generation. There is a new main menu line 'Worldgen test', where you can test different worldgen parameters. The idea is that later, a player would never be allowed to actually play the world he or she has created here: I want the exploration and information trade to play an important role in the gameplay. Hence, you can set up the world generator parameters and run it several times to have the rough idea about what to expect from this world parameters, but you never know exact disposition of islands, resources, towns etc.
That's first screen, where you can set up the worldgen parameters:
There is always 1 standard set, named DEFAULT, but you can change it, or create others, you can also save all sets to a file for later use.
Not so many parameters right now, but that's enough to create quite different worlds. I will have to add some world rejection mechanism later, to prevent a player from trying play naval game in the world without oceans, or to filter out some more subtle issues.
You can set up a specific seed, but it doesn't affect resource distribution, only biomes.
Once you've generated the world, you will see the world overview screen:
It gives you some high-level idea on islands size in this world, and you can easily check if there is a lack of certain biome types. It can be important, since some resources are restricted to appear in certain biomes. Mountains and tropical biomes are gonna be very important, in particular.
The main information is concentrated in the 'detailed' mode, where you can actually observe all global world tiles and their properties:
Each tile is of scale 5x5 kilometers. The same scale I gonna use later for actual game, in 'fast travel' regime.
You can also turn on rare resources overlay:
There is also a legend window with resources notation:
Biome types are determined by elevation, temperature, moisture and drainage, and currently these 4 properties have no other use. I'm still not sure if they should actually play any other role in gameplay, but we will see (I have temptation to use temperature somehow, since certain biomes may actually have a wide range of temperatures, deserts in particular).
Regarding resources, I came up with a bit confusing mechanics, according to which there are 3 different categories of 'resources'. I term them
basic resources,
rare resources and
products. You can think of products as of output, actually used by civilizations; these products can be obtained via gathering basic or rare resources.
There are only 4 basic resources: fertility, wood, animals and fish. Fish can be found only in the oceans, and other 3 in different mixtures can be found on land. There is no randomness in basic resources, they are determined by biome types. Basic resources can be used on its own to generate products: civilizations can use fertility to get vegetables or grains, wood to get timber, animals to get meat and leather, and they can catch fish. However, main bulk of products can be gained only through rare resources. Here we have another interaction between rare and basic resources: e.g., fertility provides bonus to plant-based resources like coffee or grape vines, increasing corresponding product outputs.
Amount of both basic and rare resources is expressed in per cents. Later it would determine amount of corresponding products, that civilization can gather from the tile.
Just one example to understand the mechanics better. Let us have the following tile:
There are 20% fertility, so a civilization would be able to gather 20% of vegetables and grains from the tile. There are only 5% wood, so civilization can gather 5% of timber. Tile has 10% of basic resource 'animals', and 15% of rare resource 'cows'. Both provide meat and leather, so meat and leather outputs are 10+15 = 25% each. 'Milk' is provided only by cows, therefore, amount of milk is 15%.
When I get to civilizations, most likely there will be some specialization, so the civilization would have to choose, whether they want to build farm and gather vegetables/grains, or build ranch and gather meat, leather and milk, or build woodcutter camp and gather wood. But I'm going to think this through more carefully soon.
As you could see on one of the pictures, there are about 40 different rare resources now. Their placement mechanics is rather simple, it is just a roll with biome-specific odds, each tile can have up to 3 different rare resources.
Few more pitcures:
Northern lands are scarce with everything, but taiga can provide civilization with enough timber and some food, also the fur animals can be found almost exclusively here.
Islands with steppes are filled with cereals and livestock production potential.
I feel like tropical forests are kinda OP: so much of everything, and they have many unique products like tea, coffee, spices or ivory.
What's next? The world still lacks many important world characteristics. There are no rivers (I'll probably postpone them for a while). There is no wind map (very important for the player, but I have no plan to use it on civilization level currently). There are no currents (I would like to have them later, but again, they don't matter at the civilization level).
So, I'm going to push towards the civilizations and resource trade between them. The plan:
- Some supplementary world calculations: identifying number of islands and their properties; island names generator.
- Civilizations. I need to think carefully, how they would gather resources and how they would spend them; how they trade resources (without involving the player). I think I will write my thoughts on this later.
I didn't compile a game build with new stuff, I may do so if there are people who are interested to play with the current world generator; let me know
PTW. I loved Admiral: Sea Battles back in the day (and I'm a real life sailor)
That's a honor to have the real sailor in this topic! Thanks for the reference, never heard about this game before, gonna check it later.