Thursday, July 26, 2007

Procedural Content Generation for a Star Trek MMORPG

What if a lot of the content -- planets, asteroids, etc. -- of Star Trek Online were procedurally generated on demand, rather than all of it having to be hand-created by artists and programmers?

In other words, information about assets is stored as a short series of values, which are then used as inputs to code (the "procedure") that generates the final version of the assets at run time when (and only when) a player needs them. The appearance and behavior of assets is dynamically generated by the code, rather than being stored in some bulky and near-final (but quick to display) form as data.

This was a technique popular when storage space and bandwidth were both very limited. As processor speed over time became the more significant bottleneck, programmers switched to pre-generating assets because it's faster to push those to the user. (But I understand that procedural generation has remained popular with demo programmers in Europe -- I think it's where Will Wright got the idea for how to create sharable creatures in Spore.)

Both Spore (for creatures) and Infinity (for planets) are using this method for defining content. Because the number of values used to produce the output is relatively small, Spore benefits from this method because it minimizes bandwidth in sharing procedurally-generated creatures over the Internet with other players. And Infinity benefits because the small storage footprint of each world allows for billions of unique worlds (and their rapid generation) on a game server.

So, going by that definition, I don't think we've seen anything yet from Perpetual that suggests that there'll be "run-time procedural generation" of content, which I agree would be tremendously exciting. Although Perpetual may be doing some random generation of planet features, it appears that planets are being pre-generated and hand-tweaked.

When presentation speed is an issue, that's not necessarily a bad choice.

But man, wouldn't it be beyond cool if Star Trek Online procedurally generated millions of planets in the Star Trek galaxy to explore?