Skip to main content

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. 

Comments

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

    ReplyDelete

Post a Comment

Popular posts from this blog

Burnout

After several months of near constant stressing about work deadlines & topsy-turvy project schedules, I finally came to terms with the fact that I had burnout.  Recently I've had a growing sense of apathy & general disinterest towards work. A deep feeling that I can only describe as a feeling of treading water, with no hope of forward momentum or progression any time soon. The tasks I've been managing & proceeding through are important but feel very much in the auditing, administrative & policy driven arena; rather than the outcomes focused problem solving I'm more accustomed to.  It's odd however, until I recently took some much needed time away from work that I realised I was also in the grips of the complete antithesis state of full blown obsession/worry over messages, deadlines & not blocking other people's progress by them waiting on something from me. Subconsciously I think this last stems from having a burning need for this process to fina...

Embracing the Procedural

It's been a hot minute since I've had a chance to update regarding Galliventurer. After playing around a fair bit with backends and trying a number of different nosql databases, one of which has been running pretty solidly with the existing discovered universe of a few hundred (470+ presently) stars and their 24k+ satellite bodies. Things are humming along quite nicely and there is even the beginning implementations of some actual game functionality, such as flying the (placeholder) ship through the universe in a soon to be released build! However there are several things that I hope to address in the very near future: 1. Procedural Universe Whilst the universe is cool and all at the moment, it's very rudimentary and no where near close to the level of detail I'm after. From researching a bit, I've found everything that currently takes up space in the database can actually reside solely in an algorithm and follow the whole procedural generation a lot more faithfully...

Galliventurer - Dreaming of a Universe

n. Galliventurer - one who adventures whilst gallivanting. We have a name. A compound of the words gallivanter & adventurer it fits the game quite nicely. It will also be the name of the player's ship (though, you may be able to have many ships throughout the game). Also trying something a little different for this project, practicing what I preach as it were. I'm actually going to plan this out a little bit before I ever actually write any code. Oddly I feel that most of my hair brain schemes of previous years have had a fast paced "rush to market before someone else thinks of this" attitude. So obviously there was no time to stop and take a moment to put any thought in before code went into editor. None of those projects ever made it out of the proof of concept phase oddly enough, no prizes for working out why. In the spirit of all this, things are different this time around. Having given it even two minutes of thought there are several issues....