This wiki is archived and useful information is being migrated to the main bzflag.org website

BZW

From BZFlagWiki
Revision as of 21:47, 18 February 2007 by JeffM2501 (Talk | contribs)

Jump to: navigation, search

The BZW format is used by BZFS to define the game world, or "map". This file is a plain text file that is loaded by the server application at start up and sent to each client when it joins the game. The map file contains a list of 3d world objects that populate the world, as well as optionally settings and options for the server to use when running.

Basic Format

All structures in the BZW format are contained in this basic block structure

      OJBECT_NAME    #comment
        KEY  VALUE
        KEY  VALUE
      end

The object names are special keywords that are recognized by the BZW parser, unknown names will produce a warning at run time. Each object type has it's own subset of recognizedly keys and associated values, depending on what it does. All blocks must have an END statement to be valid.

Here is small example world:

      world  # simple world containing a box, pyramid, and mesh
       name Simple World
       size 100.0
      end
      box
       position -20 -20 0
       size 10 20 10
      end
      pyramid
       position 20 20 0
       size 10 10 20
      end
      mesh
       vertex -10 0 0
       vertex 10 0 0
       vertex 0 10 0
       face
        vertices 0 1 2
       endface
      end

Object Types

The format of this text file consists of any number of objects listed in any order (except that physics, textureMatrix, dynamicColor, and material must come before they are referenced) separated by newlines and grouped into blocks of types. The list of world types consists of: