Return to “[Archived] Daily Dev Logs, 2012 - 2015”

Post

Week of October 6, 2013

#1
Sunday, October 6, 2013

Summary

Slow day :eh:

Worked mostly on integrating FMOD events into the engine, as Francois and I are going to be using them to make the music in LT reactive. I'm super-excited about that!! :D But integrating another API is always boring work, and I can't say that I find the FMOD API to be particularly pretty :think: Anyway, it's done now!

I'm still really unsure of how I want to proceed with the whole string tree / reflection / automatic creation of types / moddability thing. I feel like this is one of those big moments where I could make a reallyyyy good choice and come up with something amazing that would totally streamline development and have loads of good side-effects. Or it could be one of those moments where I utterly botch it up and introduce unnecessary complexities, forever hindering Limit Theory, my brain, and the human race (ok just kidding :shock:).

So…may the simplicity-and-clean-architecture force be with me tomorrow :D

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of October 6, 2013

#2
Monday, October 7, 2013

Summary

Nailed it :D

I'm pretty sure I've come up with the right answer for reflection. Yes, as I sit here reading a detailed, automated report of every single piece of data that makes up a ship, I'm pretty sure I've come up with the right answer ;) And it only took a day to get it working for a solid half of the data in the engine (that's a lot of data, to be clear)!

So, what does it mean? Exciting things. Well, exciting technical things. I can do super cool stuff now. For example, I could write a widget that could inspect the structure and value of all of the game's data...while the game is running. And then I could change it...that'd be pretty great for debugging! Modifying any piece of the universe. Very keen to try out this idea when I get a chance :D

More importantly, though, this technical feat means that I can now write an automatic string tree converter - I can take any type and use a string tree to create it (equivalently, I could save any type to a string tree). I think I've probably just saved myself gazillions of hours of tedium in the future. Not just for LT..but for all my programming work. I'll never have to write another specialized parser for data ever again! (Well, so long as it's my data :roll:)

I've been thinking a lot about how I want to write the procedures that take a technology and generate a specific type of item. It'll involve many arbitrary choices, so I'd like to keep it outside of the source code. It follows that I need some kind of scripting language for building algorithms externally. C++? Python? LUA? No! Let's use our brains here. We already have something (or will have something) that can load arbitrary data. So...let's just make a data format for code ;) I can write some simple, functional-esque expression structures, and then automatically load them! This should allow me to write anything I want in external files, while still using the exact same loading code. Everything unified :geek: Code and data...all the same ;)

Really must say...every day I feel that building this game is a simpler and simpler task. Code keeps falling away, concepts keep getting clearer, and work that would once have seemed impossible gets easier every day. In the beginning I wasn't sure if that trend would hold up, or if I'd hit some kind of simplicity asymptote. But code keeps disappearing and there's no end in sight. My belief that things are simple when you try to understand them in the right way - my belief in the "theory of the nonexistence of extrinsic limitation" (casually known as limit theory) - grows stronger with each passing week. Fitting, isn't it? :)

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of October 6, 2013

#3
Tuesday, October 8, 2013

Summary

Phew....intense day :shock:

I basically waged war on my entire codebase today as I prepared the remainder of the data for reflection-readiness. In the process, I'd say I touched...probably about 40 or 50% of the 664-file codebase :shock: But these sweeping changes are going to do wonders. Really a major leap today in terms of quality and cleanliness of the code as a whole - and with the added bonus of reflection. I'd say I've got about 80% of it working now!

So I really couldn't resist trying out the whole "uberwidget" universal data viewer. It was awesome :D It took me about 60 lines of code to write a widget that shows me....everything!!! Total data control is mine!! :twisted: :twisted: You can't hide from me anymore, you devious little bits and bytes :squirrel: Seriously, it's pretty great. I didn't implement editing yet, but I'll do that soon as well :D

Another thing that I didn't realize until now is that this reflection engine is going to do wonders for memory profiling. Already I can see some surprising trends in memory usage, and realize that I didn't have as good of a feel as a I thought for where my bytes are being spent. But just as I can now make a universal data viewer/editor, I could also easily make some kind of universal memory graph where I can check out exactly which pieces of data are taking up the memory, and locate the big offenders in what is already a 300MB+ RAM footprint :shifty:

I started on the string tree converter today, but got sidetracked by other things. Not a big deal though, as it really won't take long to write - the hard work is in retrofitting everything to expose reflection data.

Feels good guys, feels real good. This is one heck of a codebase, and I think all of the hard work that I've put into doing things "the quality way" will pay off sooner rather than later (hopefully this time in the form of easy mod-capability and some awesome debugging tools!) :)

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of October 6, 2013

#4
Wednesday, October 9, 2013

Summary

Spent forever going through different ideas for syntax for my generic data format. I think I finally settled on one that'll work for a lot of different purposes! Not only that, but I've written the full string tree parser for it.

I realize now that string tree is actually not a file format, it's an intermediate data format. If I want, I can actually define multiple file formats for different purposes, write a string tree parser for them, then proceed to use all of the operations that I'll define on string trees. Cool! Although, in reality, unification suggests that I should just find a really good syntax / file format and stick to it for all purposes. Well, I think I've got it ;)

Here's an example of defining a three-element list (vector) of 3D points in a few different ways:

Code: Select all

(3, (1, 0, 0), (0, 1, 0), (0, 0, 0))

Code: Select all

Vector (
  3
  (1, 0, 0)
  (0, 1, 0)
  (0, 0, 1)
)

Code: Select all

Vector (
  size = 3
  V3(1, 0, 0)
  V3(0, 1, 0)
  V3(x = 0, y = 0, z = 1)
)
The neat thing about my format is that it has two optional elements that make it very expressive: a field "name" and "type". Each datum can have a name and type, or one, or neither. A datum without a name will be interpreted as an anonymous field and will be loaded into a type in the order in which it is found (hence, three anonymous fields in a 3D point will specify the x, y, and z components...obviously it would be annoying to write x =, y = , z = all the time). A datum without a type will deduce the type based on the way in which the application is trying to load it. However, it's necessary to write the type when you're creating a derived instance through a base pointer (i.e. I need to specify "Ship" or "Planet" when loading a generic "Object"). It can also just be nice to explicitly write the type for the sake of readability.

I like a lot of things about this format. Simple pieces of data like a 3D point remain very easy and lightweight, for example, (0, 1, 0). But complex structures like an entire technology tree can remain expressive and easy to understand via the use of explicit names and types.

I've already written the basic code for loading arbitrary types from string trees, and it already works for everything except pointers (and derived types) (which are of course the only challenging things :P ). Awesome! I don't think it's really fully sunken in yet that I've just enabled any type in the entire engine to be loaded through a file :shock:

Hope to start using this to build tech trees ASAP! :D

PS ~ I know it's stupid that you have to explicitly specify the size of a vector/list, but in the future I will write a specialized parser for vectors to prevent that (right now a vector is treated just like every other type, with no exceptions, which is kind of cool when you think about it ;) )

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of October 6, 2013

#5
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 :D

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 :thumbup:

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! :geek:

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of October 6, 2013

#6
Friday, October 11, 2013

Summary

Not really the day I wanted it to be...but it wasn't my fault, I swear! :(

I was innocently tinkering around with text fields, toying with the idea that I could write "script" code (UDF) directly in text fields and use it to create stuff while the game is running. I successfully tried this with icons, which was pretty sweet - writing custom icons directly from within the game, using my format!

But. I ran into an oddity on the Linux build, wherein I could not type any non-alphabetical caps key (like !@#$%^&*(), etc). Oh boy. It's one of those times when you see what looks like a slight dip in the road, and then many tears and a totaled car later, you think, "wow, that was a deceptive pot hole." That's about how my day went :x

Too many hours of examining the SFML source code, linux man pages, and ridiculous, obscure snippets on X key symbols later...I came to the conclusion that there's a serious problem in the Linux version of SFML that prevents many keys that require shift from working. Ugh. Unlike the last issue I had with SFML, this one didn't look like an easy fix (because different keyboards have different shift/non-shift mappings). So I decided to work around the issue instead :angel:

It took too long to write a work-around, but at least it works :problem:

Well...other than that...I did a lot of...thinking :shifty: No but seriously, I did explore some interesting conceptual territory related to the code / data relationship, and how I can provide more power to the reflection system by making it aware of various pieces of code that it can use to convert data to and from various sources. Maybe a bit abstract at the moment, but it's one of those weird lines of thought that I feel could be important to me in the future :)

Ok, tomorrow will be better...no potholes! :monkey:

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of October 6, 2013

#7
Week Summary

General Sentiment

Well, I definitely nailed the engine tech / practical side of development this week, but I'm a little ashamed that I didn't balance it out with some "visible" stuff. No doubt that this was an absolutely massive week for the LT Engine. The reflection system has already proven to be worth it's weight in gold, and I'm certain that it's going to be a game-changer in terms of the technical feats that it allows me to pull off :) UDF is also an exciting development, and the fact that we can already specify any piece of data externally in a plain-text file is super cool :thumbup: Modding has never looked so feasible!!

Still, the graphics squirrel in me is really hoping for some more visible / shiny stuff next week :squirrel: :squirrel:

Some AI progress would be great as well...but I fear that AI is deadlocked until research mechanics are fully implemented :think:

Major Accomplishments
  • Integrated FMOD events in preparation for adaptive music
  • Implemented automatic reflection across the whole engine ;)
  • Used reflection to implement an uberwidget that can peer into everything, including your soul
  • Wrote a string tree parser for "UDF" - universal data format - which will be used extensively to control soft-coded pieces of the game
  • Implemented universal type loading from UDF (including abstract types!)
  • Developed "enabling / modifier tech" conceptual framework for understanding research
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of October 6, 2013

#8
Saturday, October 12, 2013 aka "The Lost Dev Log"

(As of 10/22/2013)
I've just noticed that this week is missing a log. How did that happen!? I'm positive that I wrote it...writing the dev logs is a ritual that is never forgotten :shock: Where did it go? An errant deletion by a groggy Josh, or perhaps a jealous murder by another, less exciting log entry? Or...the workings of the paranormal...

I guess we'll never know what really happened on Saturday, October 12, 2013.

But one thing's for sure. Something's afoul here. Watch your back. Keep your posts secret and safe, for there is an evil at work here that will feel no shame in mysteriously consuming that which you write by the sweat of your brow.

And thus, out of this day was born, just as the scrolls of the ancients foretold...:ghost: The LT Ghost :ghost:

Steal yourselves my friends. These are dark times we live in.
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Online Now

Users browsing this forum: No registered users and 3 guests

cron