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

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....

My Shout - App Idea

With everyone working from home a lot more these days, especially in the face of a global pandemic with self isolation in effect in most place still, it becomes tricky to make good on that old "buy you a coffee" promise to your friends &/or coworkers. My Shout is the idea for a service to send things to people by alias only. The service would leverage home delivery services such as Menu Log, Favour, etc. but aimed at sending things to other people rather than ordering for yourself, though that would be an obvious function of the service. The address and location details of the person are only known to the service and hidden from others, it would be a breeze to then be able to gift things to your friends, coworkers, or even favourite creator, etc. that is halfway across the country or even the world without knowing their address.  Once a "gift" has been sent the recipient gets a notification and can schedule when to get the gift, or even exchange to an equal valu...

Vacuous Social Data Sharing

It's the not so secret, dirty secret of our modern lives. We live in a golden  age of free services that make our lives interconnected on levels that our ancestors couldn't even fathom. Instantaneous realtime interactive updates and vision of someone on the other side of the planet. For free!! We really do live the utopian lifestyle, or do we?  We are being monetized. The really insidious thing is, we like it. We crave it. Likes, follows, subscribers, retweets, pins, shares, the list goes on. We're subsumed in a culture of instant gratification and constant engagement. These "free services" have hijacked the way we think and live, all while making copious amounts of money from the personal data we all but throw at them.  Whilst there is an innate understanding in all of us about the nature of how insidious and conniving these services are. We still gobble up every morsel of social media's bright lights and flashy features, mostly without a single thought of wh...