I imagine that the world is made of lego bricks, organized into small blocks of content. Maps are divided into 'cells', cells into 'tiles', which can have objects and actors on them.
A big part of determining how the client and server will interact is determining what is the smallest 'block' of content that can be displayed by the client, and what is the smallest object that can be manipulated by the server. I've put a ton of thought into this over the last day, and I've come to a final decision on this issue:
The smallest object in the game will be a landscape tile, which can be either a single textured tile that a player can walk on, or a piece of an object that is only one tile wide. Examples of these tiles could be: a small patch of grass, a chair, or a large stone brick in a wall. Landscape tiles are represented by a single graphic texture, and data giving them values for sound, 3D 'height', and flags noting whether the tile blocks line of sight, light, walking, etc.
Landscape tiles are combined into groups in two ways. For the textured ground that makes up much of the world, they are combined into 8x8 cells and these cells aggregated into entire maps. They can also be combined in a totally different fashion, into static objects. A static object could be a wall made up of fifty stone bricks, or again, a single chair (using just one landscape tile). Static objects are the smallest thing that a player can interact with or that the server can manipulate.
You would think that this is a simple revelation, but it took me two hours of planning to figure all this out (along with the file formats for these two kinds of data).
Friday, May 23, 2008
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment