Random Generation That’s Not So Random

While I do want the Galliventurer universe to be procedurally & randomly generated, I don’t want it to be truly random. There needs to be a modicum of probability involved. Some weighting so that some things are rarer than others. After all we can have too many diamond covered planets or uranium based suns – as you can see I haven’t actually started thinking too much about the composition of the planets, stars, etc.

Keeping this probability based random selection in mind, I’m going to be using a dynamically weighted series of arrays to randomly select properties for entities in the Galliventurer universe. Using something very similar to (or based on) this article by Michael Czechowski https://observablehq.com/@nextlevelshit/rejection-sampling-in-javascript. The main bit of complexity here will be the values of a randomly selected property will affect the weights of the next selection. For example the size of a star will greatly change the weight of the probabilities for the temperature (which determines it’s colour). Another example would be a star that is randomly selected to be large, will greatly skew the weights to have more orbiting planetary bodies.

Now off to determine all the things that need to go into the lists, and what their initial weights for probability should be, wish me luck. 

2 thoughts on “Random Generation That’s Not So Random

Comments are closed.