Ardenfall’s world is split into cells – each cell being a square chunk of the world.
Each of these cells hold a lot of info – foliage data, region information, a scene, and other stuff. A lot of this stuff is automatically generated, because otherwise I’d die trying to get it all done!
At first, my batcher was a simple EditorWindow, each of my tools in that class. But that quickly became cumbersome. I wanted to make each tool separate, so I built a very simple system.
SceneBatcherWindow: Holds all of the tools, and runs each tool after the other
SceneBatcherTool: An actual tool that can be run, canceled, and completed.
Here’s a screenshot of that window:
And here’s what each tool does!
Generate Navmeshes: [Unimplemented] Will generate a navmesh tile for each individual chunk, and during runtime these tiles will stitch together
Generate Light Probes: Places a lightprobe at every navmesh point
Build Lighting: Builds lighting for scene
Build Occlusion: [Unimplemented] Will build occlusion culling for scene
Generate Previews: Takes a “screenshot” of the scene, to be used in the in-game map UI. (These are stitched together during runtime)
Generate Distant Terrain: Generates a Distant Terrain prefab for scene. (I’ll post about this later on)
Also, note that I can batch the current scene only, if I choose to. Each tool has been designed to allow only specific scenes be built, rather than all of them. This means if I move a rock, I just need to build for that scene. Fast and easy!
In short, build tools for your tools. It makes life easier!