i want the terrain in my world to generate the same every time (i.e trees are in the same place) given the same seed,

but loot chests/enemy AI/enemy drops/etc to be non-predictably random.

+2 votes

i want the terrain in my world to generate the same every time (i.e trees are in the same place) given the same seed,

but loot chests/enemy AI/enemy drops/etc to be non-predictably random.

Godot version
3.4.4

Why can't You use two seeds ?

One calculated using stable ID and another one calculated using randomly generated number ?

Yes, what Inces said. The point being that the same seed will always generate the same sequence. So, for the stable number set, always use the same seed. For the unstable set, use a random seed.

You could use a uniform distribution RNG for the non-predictable random (the larger the minimum and maximum value, the least likely every number in the bounds will be generated) and for the predictable RNG you could use some other distribution (maybe a normal distribution) so that most of your RNG values lie within close distance to each other.

You could also go with another approach where you manually define the probabily of each event you are workign with. So if you want trees to be common in certain areas, then when you are in a forest area, the probability of a tree spawning in a cell should be increased vs. the probability a tree occurs in a cell of a desert. For enemies you could similarily define the probability of enemy encounters, and you could fine tune the probability based on things like sneaking vs. not sneaking, in an enemy base, etc.

- All categories
- Engine 32,284