Real-time changes

Again, another long gap between entries.

Tools are as important as the game itself. Getting it right is important. I’ve thrown together a lot of code with minimal planning so far. Because this is a brand new area for me, there isn’t much that I draw from past experience to quicken the pace or foresee issues as intuitively as when writing the game code. Plenty of dead-ends have been encountered while writing the tools.

Now that I’m another step closer, it opens up more possibilities that weren’t able to be explored previously.

By far, the best thing I’ve gotten out of the whole experience so far is hands-on time with Windows’ change journal. It’s deceptively straightforward. Specifically for the editor, Anvil, there are three sources of data which are constantly being checked for changes: source, intermediate, and output data. They may reside on different drives, so that’s fine. However, if two or all three are on one drive then the issue becomes that the change journal will miss updates for one. This still doesn’t make sense to me, as each change journal class maintains its own set of change journal records so each one should just be able to pick up where it left off and not care that another change journal has read changes. Anyway, I’ll start rambling if I don’t stop now. The point is that when a change occurs in any of the data sources, the data will be reimported or reprocessed as necessary. A problem arises if the user doesn’t have the prerequisite tools installed for importing, such as Maya. I’m working on two solutions; one to commpletely disable importing for certain types of files (models, textures, sound, etc.) and one to only allow the option to import if the tool is detected as installed on the machine.

I have the DAG working, which relies on GUIDs being generated for each node. At the moment, DAGs are not saved but may be loaded. The Maya importer also doesn’t remember if a file it’s exported previously is a part of its DAG. There are a few operations left when it comes to DAGs. Notably that they have to be saved and restored correctly and that whatever is using a DAG doesn’t end up creating duplicate nodes.

Outside of close-to-complete work, I’ve been going down the rabbit hole that is lightmapping as well as CSG. I’ve never written either of these but have a general understanding of how they work. The goal with CSG is to allow for quick iteration on level creation, rather than using it for final geometry. There will be UV mapping for CSG but only so that lightmapping can be applied to get a sense of the scale of environments being created. CSG will be exported as an Alias|Wavefront object file because many DCC tools can work with them. This allows for the level to always be in an “under construction” phase without the need to replace the CSG wholesale on the first iteration of the game-ready geometry. Providing the option to toggle the CSG on or off as well as the final level geometry should help with iteration times as well as provide a way for the level to be played with a mix of first-pass and not started areas.

Lightmapping is pretty much a new area for me. I have the most basic understanding of it in comparison to CSG. I don’t know the real differences between all the different methods of creating them, nor the implications of one over another. If shadows should be baked in, selectively baked, how something like a flashlight would affect the lightmap, packing the UVs, performance considerations (both baking and when the game is running), and many other things that I haven’t yet considered, I’m sure.

What I’d like to do next is handle the change to the model format in the game, as it changed while I was working on the importer and processor, and try my hand at a few different shadow techniques. It doesn’t make much sense to make this detour right now in the grand scheme of things, but I need a break from the hard tools work for a short while. I am very much so considering doing something akin to the recent Abandoned trailer from Blue Box Games.

I’m aiming to get something ready in time for Halloween, but I’m very unsure if I’ll make it. My artistic skills being what they are and all.

Next update should be shadow related.