Lists on lists on lists

It’s alive!! Well the very infantile functional proof of concept for the idea that is the procedural generation for the universe of Galliventurer is alive.

Above is the result of a single generation run at the time of writing (hopefully I remember to save a copy of that function and update the call as it will soon be changing). It’s quite rudimental at the moment. A random selection from a few different lists without any inter-relational weights or even the possibility of child entities. At the moment (again time of writing) the objects “discovered” aren’t even saved! 😱

In the very near future however, the procedural generation will have a few steps. The beginning being a random selection of an entity type. This very top level will consist of:
  • System
  • Stars
    • dwarfs
    • giants
    • neutron
  • Planets
  • Asteroids
  • Comets
  • Junk/debris
  • Substellar object (brown dwarf)
  • Moons
  • Nebula
From this first there will be a series of inner lists for each type. Certain types will have a children property with a range of likely amounts of sub entities. For example a system would have a children range of 1 to 3 stars; a star would have a children range of 2 to 100 which could be planets, asteroids, junk, substellar, etc and so on. The beauty is, everything is referential. An object has it’s properties: uiddata (colour, size, life time, etc), optionally (dependent on type) an array of children uids, and physical mapping through an array of vector coordinates in neighbours & possibly game centric id references like shaders, terrain maps, etc.
Side note, we’re currently moving house, not by choice but hey that’s the rental life. Whilst packing up my office area, I stumbled upon my raspberry pi. I think I’ve found my first embarking pylon. Periodically & regularly running the procedural generation and punching it to the database!