Sunday, June 23, 2013
Summary
As the hours tell, I spent the majority of my day getting cozy with my notebook. The item generation just keeps making me flip-flop on my approach, and I've decided it's probably best if I stop trying to code it without having a clear picture of the solution. Ah, a lesson I will apparently never learn - think it through fully before coding! I'm making strong conceptual progress, at the very least. Without much code progress to talk about, I suppose I'll just dump some of my thoughts from the day.
There are two types of items in the universe: those provided by the universe, and those created artificially. The first is by far the easiest to generate: raw resources should be mostly tied to the topmost universe level, with perhaps the occasional regional resources. The distributions thereof are subject to standard mathematical trickery, with no fanciness needed for any particular coherence (other than smoothly varying probability distributions).
Then, there are artificial items. These are harder. The reason they're harder is that, if you really wanted to generate these items properly, you would need to run a simulation and allow the AI to just "invent" these items. This would produce an extremely realistic level of coherence and significance behind the items. "Magmapulse Mk III was the gun that turned the tides of the great Squirrelian-Borg war. The Squirrelian scientists made some major improvements to the Mk II just in time to deliver a new level of firepower to the Royal Nut Fleet, allowing them to overpower the cubes at the last moment." Obviously an overboard example, but it's nice to dream about this level of realism On the other end of the spectrum, there's LTP, with 100% random and incoherent items! Don't worry, we'll fix that
One of the keys to coherence is "series," i.e., having several pieces of equipment that span a certain gamut of value, but share similar properties. The Magmapulse Mk I is suitable for a fighter, while the Mk V is suitable for a battleship. Both of them share the trait that they are generally slow-to-fire, but do absurd amounts of damage at short ranges. This all sounds like common sense and you're probably asking why I haven't already coded this up. But there are more questions to ask! Does this reasoning apply to all "types"? Do shields have series? Sure. Sensors? Probably...? What about armor? Err...I guess? What about ship types? ...? Place types? ...!? Docking Bay Mk IV... So clearly there should be a general solution to series generation. But how general is it, exactly? To what subset of types does it extend? Is this subset an arbitrary one, or does it have some significance? And while we're at it, how does technology play into all this? What about factions? And the bit-depth of the Mersenne Twister seed??
Luckily, I did actually manage to do more than just ask questions all day! I answered some of them! Here goes: any subsystem that can be mounted to a ship should be considered to be a "relative" subsystem, and should be eligible to be part of a series. Ships naturally have a certain "level" associated with them, so anything you can mount on a ship should be no different. Technology can be thought of as the source that generates a piece of equipment. Equipment derives its properties from the properties of a given technology. Factions are the source of technology, so the order of generation can be thought of as faction->tech->item. Still, for the sake of the game there should be some "universal" technologies. All of this creates coherence that the player can learn to recognize. "Meson"-based guns are typically red and have an unusually long range, but are easily defeated with a lot of plating. A meson gun may or may not have the name "meson" in it, but the player would be able to see that "Meson Engineering Mk .." is a prerequisite for construction. And as for the Mersenne Twister, it should be seeded hierarchically, starting at the universe seed, then appending every regional seed recursively, and finally, a seed for the item being generated. This means that literally every item you ever see in LT will be 100% unique. Way more than 4 billion (that would be 32-bit random). More like...err, a novemvigintillion? (Seriously, it's a real word ) On a side note, I have literally zero clue what a meson is, so I should probably go look it up and learn a bit of physics before I start tossing random tech trees around.
It goes without saying that not all ship equipment would be generated as part of a series, there would also be some propbability of a "unique" piece that stands alone.
Slowly but surely, I am solidifying the conceptual glue of the LT universe. Everything just takes time and thought. No magic, no brilliance. Just time and thought
[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
Post
Sun Jun 23, 2013 11:42 pm
#1
Week of June 23, 2013
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford