Creating Virtual Worlds
Foreword - How it was, how it shouldn't be, how it should be...Normally you are paid as a more or less talented individual to implement the level idea into a working game world. That applies wether you build a single player level, a multiplayer one, a strategy map, or a massive multiplayer online world. You then normaly would build the level out of single vertices, polygons, or brushes like cubes/wedges etc. After laying the general layout, you add lights, objects, add story elements and puzzles, connect buttons, etc. At some point your lead designer approaches you (imagination of this approach is left up to the reader :-) and asks you to make a few changes. Add one more room, don't use that texture, no, this object is too big, we need fewer polygons. You practically redo your level a couple of times. Given a hard timeframe, probably buggy tools, lame programmers that won't implement your cool ideas into the scripting language but eat pizza instead - all that lets you grow gray hair. So we want to do it a bit different this time... Instead of bothering with single brushes, or objects or polygons, we will only work with Cells. Basically it goes like this: Our world consists of a cube cell, which is split up into child cells. This is done recursively until we no longer want to split, and then the cell is generated as a room (or left empty). Each cell has properties to describe its appearance, size, name etc. The parameters that describe the cell's room are inherited by all its child cells, where they can be overwritten. Also each cell has Things that can be placed in it. Things can also be inherited by child cells, to make it easier to place a thing in each of the subcells. But let's start simple and make a world that consists of only a single room:
|