How Autogen Works

From VentureTheVoidWiki

Jump to: navigation, search

How does the world generation work? It's a complex process, and not perfect. But I thought it might be interesting for other developers or curious players to understand better what goes into a Venture the Void World Pack.

Ingame vs. World Pack Generation

Think of the World Pack as containing detailed instructions as to how to build the world, but no actual graphics or geometry. It contains instructions as to how to put together a tree, where the landforms on a planet should be, where buildings should be laid out and what they will look like, what textures to use and what operations to perform on them, what ships populate each planet, a stupid amount of information describing each NPC, information on how quests unfold, what attack patterns each type of enemy/ship should use, dictionaries describing how to construct languages for alien races, and so forth.

While the amount of information contained in a World Pack is quite large, but it doesn't include any actual geometry. So things are described more abstractly. "Use this texture for this tree, and follow this procedure for generating it's branches/leaves." vs. "This is a 3D model of the tree to use." The reason for this is the sheer amount of detail in a world. World packs might be 10MB to download (compressed) but all the data actually required to render every type of tree, every planetary terrain, every ship and every city might be more like 10GB. That's one thousand times as much data as is actually stored in a world pack.

Caching

As the game takes the abstract information contained in the World Pack and generates actual 3D models with it, it caches this to disk. This process saves a lot of time, since the next time it needs this data, it doesn't have to generate it, it can just load it from disk. However, since the total amount of data in a world pack could be incredibly large, it needs some way to clear out older data. So, the game actually includes a cache manager to keep from using too much disk space. The game tracks how recently the different cached 3D models were used, and deletes unused ones to free up space. So for instance, if you haven't played a certain World Pack for a long time, the game will go ahead and delete the cached data stored for it. This way, the World Pack you are currently playing in will load faster. As well, if there is an area of the current World Pack that you've never visited, or not in a long time, it's not taking up disk space on your hard drive. The next time you play the old World Pack, or visit a new area (or even just an area you haven't been to in a long time) the game will just regenerate the cached data! Smart!

World Pack Generation

So how does it actually generate the data inside the World Pack? Ah, this is a huge process, and where it gets interesting. To be continued... =)

Personal tools
Navigation