Not so random resources and enemies

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

ske
Filter Inserter
Filter Inserter
Posts: 412
Joined: Sat Oct 17, 2015 8:00 am
Contact:

Not so random resources and enemies

Post by ske »

I did not find my idea and think this suggestion is different from the RSO mod and not yet mentioned in the World Generation thread (https://forums.factorio.com/forum/viewtop ... 80&t=13022).

Problem:
Currently, the resources and enemies are generated rather randomly. A bit too random for my taste. Some maps are very hard to start because some resource is missing and some maps are very easy because you can upgrade to laser turrets before the first contact with the enemy.

In order to have a more exciting start of the game, the map/resource/enemy generation could be overhauled a bit. I'm talking about some "normal" difficulty setting in the following.

It should be generally known how much resources you need to get weapons for fighting a certain size of biter nests. So, before spawning the first enemies, there should be that many resources available. These first enemies then sit on top of the next resource patches that the player needs in order to proceed.

What's needed is something to change the current working of the (pure?) perlin noise generator in order to generate some more order.


Suggested solution:
I assume that the perlin noise generator outputs numbers between 0 and 1 and a threshold defines the level from which a resource appears on the map.

Now, we define an amount of expected resources that should be available within a distance r from the starting location.

When generating the map, we always generate a circle (or square) of radius r from the starting location. (Is this even done differently now when walking straight in one direction?)

We integrate the amount of generated resources within r and adjust the threshold depending on the expected resources within said radius (e.g. threshold(r) = 0.5*generated(r)/expected(r) ).

If there are more resources generated than expected, increase the threshold, if there are less, lower the threshold. The sensitivity of this threshold raising/lowering also makes kind of a frequency adjustment with which resources appear. Close to the starting location we want a certain amount of every resource while further away there can be larger deviations from the expected amount.

The expected amount or course depends on the difficulty setting. This can be a nonlinear curve like:
1. Starting area: Enough resources for researching turrets, no biters.
2. Empty area: Some space with few resources, no biters. You need to fight to leave this area.
3. Next area: Biters and enough resources for researching the train.
4. Empty area: A larger space with only few resources but some biters. You need the train to reach the next area.
5. Next area: Spread out bigger resource fields and higher density of biters. Maybe constant or decreasing overall density of resources.

With this method most of the noise generator character is retained while it should provide the right "screws" for adjustment. I hope that the resource curve can be adjusted in order to provide easy/normal/hard difficulty levels to give the player an interesting but kind of predictable and manageable challenge with randomly generated maps.
Post Reply

Return to “Ideas and Suggestions”