JoshParnell wrote:Thursday, October 10, 2013
Summary
Finished implementing 'UDF' (universal data format) loading today, now with support for pointers (including polymorphism)! Must admit it's a pretty cool system that the engine uses in order to support the latter
So now it seems that I'm in good shape to write whatever I want in this format! I tested it by loading a ship from a file. Very cool stuff
I put a lot more thought into technology today, and how exactly it interacts with the generation of an item. I came up with the idea that there are two fundamental types of technology. The first is an 'enabling' technology. The second is a 'modifier' technology. The former is what you would traditionally think of as 'unlocking' in a tech tree. An enabling technology either enables the research of another technology, or, if it's a leaf node, enables the creation of a particular type of blueprint.
But then there's the question of how you make something
better once you've learned how to build it. And not just
better as in 'oh, let's just research the enabling tech to a higher level' (borrrrinnng), but also
different. I.e., I've learned how to create blueprints for corvettes, now how do I create a blueprint for a corvette that is specifically geared towards military / scouting / industrial / what-have-you capacities?
That's where 'modifier' technology comes in. It's also where the procedural part of the tech tree comes in.
The way I see it, since the classes of items in the game are fixed (i.e. you have ships, stations, thrusters, etc...and this list of fundamental types is not extensible because it's hard-coded), it makes sense that the corresponding enabling tech would be fixed. Ship construction is a given, and sub-fields of fighter construction, bomber construction, etc. are a given. Those things need to be present and they need to map directly to the fixed pieces of the game.
With modifier technologies, on the other hand, we have a lot more freedom to generate whatever the heck we want. I think that's where the procedural part of the tech tree (and the fun 'exploration' part of research) will come in
I'm not positive yet how modifier technologies are related to object types. I don't think it's one-to-one
(it's perfectly reasonable to think that 'lightweight alloy tech X' could enable creation of many different kinds of lightweight equipment), but it's also not one-to-all (how would a technology that yields higher thruster power be relevant to a construction module?) I'm a bit confused about this one, but I have a sneaking suspicion that I can do some neat automatic things here using the reflection system! For example, retrieve a list of the fields of an item to see if a certain modifier is relevant to it.
I like the simplicity of this conceptual framework. It removes much of the complexity of generating an item type. It reduces the problem to specifying a basic / unmodified version of the item, and then specifying the way in which the properties thereof can be changed by modifier techs. Sounds fairly straightforward!
[
You can visit devtime.ltheory.com for more detailed information on today's work. ]