Sunday, October 13, 2013
Summary
Today I started down a strange and abstract path that I don't fully understand yet, but keep feeling a pull towards. I wrote some facilities that allow me (in one line of code ) to register a function with the reflection engine. The registration provides the reflection engine with all of the relevant function metadata. This means that, for any given type (take, for example, an icon), I can get a list of every (registered) function in the engine that produces that type as an output. So the LT reflection engine is now equipped to provide not just type metadata, but function metadata as well!
I'm thinking that this is the final power boost that UDF needs to help me write everything that I need to write. If I can figure out how to marry this function registration mechanism with UDF, then UDF becomes much more than just a plain-old-data specification format. It becomes data and function calls, which means it can contain generating mechanisms rather than just straight-up data. I need that, because there are certain times when I don't want to just spell out all of the data. There are times when I need to call a function to automatically generate some of it.
This work is directly relevant to technology and item creation, which, of course, is the primary objective at the moment! The thing is, there's this weird middle ground that exists between technology and an item type - a middle ground which I am trying very hard to understand There's like, a meta-item type, if you will. A type that specifies everything that one needs to generate an item type. For example, imagine a ship type. A ship type includes the model that is used to render that given type of ship. But technology does not directly specify the model. UDF should not directly specify the model. Both tech and UDF should specify the generating parameters that are then handed to a PCG ship generator function call. "Curviness," "repeated segments," "mirror axis," etc. Those kinds of things. Those are the things that you want to generate from a technology or read from a UDF file, but those aren't the kinds of things that exist in the actual ship type data. So there's clearly a translation layer in-between.
It's a bit frustrating, because I know I'm right on the tip of some major revelation. Not just concerning LT, but some major revelation in understanding code, data, life, and the universe. Something to do with "constructor" ...a word that's been on my mind a lot lately. Such a simple but amazing idea. Taking some set of data and constructing another piece of data from it...using code. In the above example, you can think of the ship generator as being a "constructor" for the ship type. It takes some set of generating parameters and "constructs" a ship type.
But you know, when you think about it, a ship type in and of itself is just the generating data for a ship...in the exact same way that the meta-type produced by technology would be the generating data for a ship type Goodness, it's really all the same thing, isn't it. I swear I'll go mad before this project is over. I can see it now...locked up in a padded white cell, shivering, sweating, yelling "data...function...data....function...data data...function data data...FUNCTION!!! ...no...DATA! YES!!! DATA. no..IT'S ALL THE SAME!! EVERYTHING IS A FUNCTION OR DATA!! but wait.....is function a data...I mean...is data a function...yes..maybe..NO..."
[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
Post
Mon Oct 14, 2013 12:31 am
#1
Week of October 13, 2013
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford