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

Editing BZW

Jump to: navigation, search

Warning: The database has been locked for maintenance, so you will not be able to save your edits right now. You may wish to copy and paste your text into a text file and save it for later.

The administrator who locked it offered this explanation: Archived wiki

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 3: Line 3:
 
==Basic Format==
 
==Basic Format==
 
All structures in the BZW format are contained in this basic block structure
 
All structures in the BZW format are contained in this basic block structure
{|
+
 
|
+
      OJBECT_TYPE #comment
OBJECT_TYPE #comment
+
        KEY  VALUE
  KEY  VALUE
+
        KEY  VALUE
  KEY  VALUE
+
      end
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.
 
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.
  
Line 19: Line 17:
  
 
Here is small example world:
 
Here is small example world:
{|
+
      world  # simple world containing a box, pyramid, and mesh
|
+
        name Simple World
world  # simple world containing a box, pyramid, and mesh
+
        size 100.0
  name Simple World
+
      end
  size 100.0
+
      box
end
+
        position -20 -20 0
box
+
        size 10 20 10
  position -20 -20 0
+
      end
  size 10 20 10
+
      pyramid
end
+
        position 20 20 0
pyramid
+
        size 10 10 20
  position 20 20 0
+
      end
  size 10 10 20
+
      mesh
end
+
        vertex -10 0 0
mesh
+
        vertex 10 0 0
  vertex -10 0 0
+
        vertex 0 10 0
  vertex 10 0 0
+
        face
  vertex 0 10 0
+
        vertices 0 1 2
  face
+
        endface
  vertices 0 1 2
+
      end
  endface
+
 
end
+
|}
+
 
==Object Types==
 
==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, and it is conventional (but not mandatory) that world, options and waterLevel will go at the top of files.  
 
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, and it is conventional (but not mandatory) that world, options and waterLevel will go at the top of files.  

Please note that all contributions to BZFlagWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BZFlagWiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)
Retrieved from "https://wiki.bzflag.org/BZW"