Random Generation That’s Not So Random

Published on

Posted by

Categories:

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. 

Comments

2 responses to “Random Generation That’s Not So Random”

  1. Inkie Beard

    Note to self – try to make the next post not be publish near midnight 🤦‍♂️🥃

  2. […] will be based on a few lists of properties and randomly matched together (see other post here about that). This will undoubtedly produce some things that probably won’t be strictly […]