This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.
Map making
BZFlag uses its own map file format, BZW (BZ World). BZW files are text based and contain a list of objects and map options that are read by the BZFS server. There is a Map FAQ that deals with several frequently asked map making questions.
Map Creation Methods
BZFlag has several well practiced methods for the design of maps, from simple text editing, custom editors, to exporters for 3D modeling software. While basic dedicated map editors, such as BZEdit, can often only create simple objects, 3D modeling software can create complex custom mesh objects, but have a much steeper learning curve.
Dedicated Map editors
Dedicated BZFlag map editors (i.e. written specifically for graphically editing BZW files) generally go by the name BZEdit. There are a number of versions of BZEdit that have been developed over the years. Each editor has its own level of support for various map features. At this time there is no custom editor that supports every feature of the BZW format. In general, these will only support simple version 1.10 objects, like boxes, pyramids, bases, and teleporters.
Editors supporting BZW 1.10 features:
Editors supporting some BZW 2.0 features.
Non-dedicated editors
Technically, you can use any 3D modeling package that can export to .obj format. You can then either use modeltool or Wings3D to convert that file to BZW format.
Blender
The blender 3D modeling application features a plug-in called BZWTools, which enables blender to read and write the BZW file format and to create BZW specific objects. Tutorials on using blender (not specific to BZFlag) can be found on the blender web tutorials pages.
Mostly, though, it is easier to use blender, scale your map correctly (there are four default blender units to two World units. Then run the modeltool to convert it. Note that exporting from blender default obj will have the whole model tilted -90 0 0.
Wings 3D
Wings 3D is a good modeler to use if you're new modeling. It has a much smaller learning curve than Blender, although it doesn't have as many features. Wings3D allows you to export wings objects to a BZW file. Tutorials on using wings (not specific to BZFlag) can be found on the wings web tutorials pages, as well as a useful tutorial on UV mapping
Getting Maps In .obj Format
It is not widely known that you can export a bzflag map from the actual bzflag client in .obj format. To do so, you must connect to a server hosting the BZW map you would like to download and type /saveworld -o "mapname.obj". This will allow you to then import the .obj file into a modeler and edit the map.
Creating BZW files via scripting or programming
Writing programs to output map files can be a very effective and efficient way of creating maps. One may, for instance, use variables to represent key heights or distances within maps (so that, for example, anyone at a given level may shoot someone at the same level), or to create composites based on collections of basic objects, co-located programmatically. Basic objects may be stretched/scaled to fit specific spaces; they may be programmatically varied in texture, color, and position; software may (internally) represent objects and work with them so that they don't collide or overlap. AI-based software may compose maps based on specific design principles, aiming for particular play styles or tactical challenges.
The core of software map generation is the creation of the basic BZFlag elements, whether the simple boxes, pyramids, etc., or complete meshes, by outputting map element statements to a file. The objects are typically output as sequences of text strings to a .bzw model file, which may then be read by the bzfs server. While simple objects may be fairly easily edited by hand, more complex objects, such as meshes, are more readily generated by software.
Mesh generation, while it may be done with Blender, etc., as above, may be done equally as well by constructing programs to output the faces required within a mesh. For example, a program may take a curve and spin it about an axis to create a 3D surface (a sort of "lathe" in the virtual world), outputting faces at each increment of rotation. Hand-written scripting software may fit irregular polygons together, defining a sequence of mesh objects that seamlessly create, for example a roadway. Writing such software usually requires very careful testing to guarantee that the bzfs server interprets the objects as the author intends.
Software map creation provides the map maker with the ability to customize objects in detail, such as whether the faces of the object allow bullets or tanks to pass, or the level of transparency to assign to any specific face, at a level of detail often hard to achieve within other 3D modeling tools. Abstractions within map generation software are often defined to create basic tactically-relevant map elements - these then may be scaled, shifted, textured, or otherwise modified to fit a particular designer's tastes or constraints.
The disadvantages in using this are that the underlying representation of the work is not available directly from the map file. The underlying intended abstractions are missing because only the resulting object primitives are in the generated map file, and there is no straightforward way to recover this (though software may be used to parse existing map files with the goal of augmenting them). This lack of directly-accessible abstraction is of course true of any tool used to generate a map, there being no standard way to encode this within a .bzw file.
Map making by Hand
The last method of creating maps is simply coding them by hand as text files using the raw BZW structures. This is still one of the most common ways that people create and edit maps, and can be very fun and challenging. This is easily done in any text editor, for example NotePad on Windows, and TextEdit on Mac OS X.
Most maps made by hand tend to be fairly simple, though experienced mappers have made some extraordinary maps in this way. The reason for the popularity of the "hand made" approach is partly because of the simple structure of the BZW code, but also the fact that, until recently, there were no graphical editors available for operating systems like Mac OS X. A detailed explanation about creating a map by hand can be found on the Map making by Hand page.
Maps that contain 2.0 objects (such as mesh) tend to have been either completely made in a text editor, or partly modeled in 3D modeling software, and later manipulated in text format.
This page is an aim at answering some frequently asked questions regarding map creation, and to help people new to mapping.
Common Misconceptions
First off let's clear up some common terms and misconceptions:
• The word "map" is not synonymous to the word "server". They are different things. A map is run on a server.
• When we say 'server' we mean 'BZFS', the BZFlag server application that comes with every stable binary release of BZFlag. BZFS allows you to host a BZFlag game, with either a randomly generated map, or a custom map.
• The standard extension for a BZFlag map is ".bzw". There are a variety of ways for making maps, and this can be done on any platform BZFlag runs on.
• You will often hear the different types of map objects referred to by the first version of BZFS they appeared in. "1.x" objects are simple boxes, pyramids and teleporters. "2.0" or "2.x" objects are objects such as meshes, arcs, materials, etc. With skill, these can be textured to look like almost anything you want.
• Textures must be in the .png format.
• Team numbering occurs frequently in BZW. Each team is given a number, and these are as follows: 0 = rogue; 1 = red; 2 = green; 3 = blue; 4 = purple.
• Think carefully about the layout of your map: Is it going to be fun to play? This is a factor that many people call 'playability'. This is probably the most important thing for a map that is intended to be played on. It may seem obvious, but you'd be surprised at the number of maps that are either too full of eye candy, or just badly thought out. You want to think about, among other things, distribution of obstacles, how balanced it is for CTF, concentration of ricochet bullets and sloped surfaces to rebound lasers.
Frequently Asked Questions
How Do I Make a Map/World for BZFlag?
There are many ways to do this:
• You can use a dedicated map editor such as BZEdit, iBZEdit or BZFed. In general, dedicated editors will only support simple map objects such as a box, a pyramid or a teleporter, and there are none in active development. On the whole, this is the easiest way to create maps for most people. See for more.
• You can use a 3D modeling application, such as Blender or Wings3D. There are plugins available for each. With a 3D modeler, you can create much more complex maps, but there is a much steeper learning curve. The blender plugin, BZWTools, can be found here. The wings plugin can be found here.
• Lastly, you can edit maps by hand in your favorite plain text editor. Most maps made by hand tend to be fairly simple, though experienced mappers have made some extraordinary maps in this way. It is a good idea to be familiar with the structure of BZW code, as often exported meshes from 3D modelers will require 'touching up' in a text editor. Even the most experienced 3D modeler user needs to know how to text edit.
Making 2.0 Objects
How do I make a cylinder/cone/sphere etc.?
You can't do it in BZEdit. You will need to add them by hand in a text editor.
See and BZW for more in depth info.
Adding Textures
I created a map in BZEdit, how do I add my own colors and textures?
BZEdit will not create colored, complex objects. If you want to texture a map made in bzedit, you will need to do so in a text editor such as NotePad. You must change the boxes you want texturing to meshboxes, and define your textures with the material object.
Where can I host textures that I have made for my map?
BZFlag offers a free texture hosting service at http://images.bzflag.org . To qualify to be hosted, you need to own the rights to use those textures (i.e. you made it, or you have permission to use it from the creator). You can submit images via the submissions page, and they will be moderated. Be patient - the moderation can take some time. Remember - this service is a privilege, not a right.
Moving Objects
Can I make moving objects in BZFlag?
The short answer is no, and there probably never will be moving objects that tanks can interact with. You can, however make moving textures with the textureMatrix object.
The long answer is yes, simple moving objects have been made that move in a circle around the central Z axis using a method of mesh drawing called DrawInfo, however these objects are always shootthrough and drivethrough, and tanks cannot interact with them in any way - in other words decorative only. The DrawInfo code was never fully documented, but is relatively easy to generate using modeltool. If you can make an object in wavefront.obj format, you can make drawinfo.
BZEdit For Mac OS X
Can I get BZEdit for Mac OS X?
Yes, it's called iBZEdit Alternatively, you could use Wings 3D, or Blender if you're prepared for a steep learning curve - or you could go for plain text editing in the TextEdit application that came with your OS.
Flag and Tank Spawns
How can I get a flag to spawn in a specific place in my map?
Use the following simple code:
zone size 0.1 0.1 0.1 ## Size of the zone pos 0 0 0 ## Position of the zone (i.e. the place it will spawn) zoneflag GM 2 ## For example, this will create two GM flags. end
Note this does not require you to use the +f bzfs option. If you use zoneflag, the flag will be created automaticaly.
How can I get a tank to spawn in a specific place in my map?
Use the following simple code:
zone size 10 10 10 ## Size of the zone pos 0 0 0 ## Position of the zone (i.e. the place it will spawn) team 0 1 2 3 4 ## Every team will spawn here.. end
Next to 'team' you put the numbers of the teams you wish to spawn. See above for more details.
Death Physics
I want tanks to die when a tank touches this box... How?
You can create boxes that kill tanks when they are touched by using a physics driver. A physics driver can be applied to any 2.0 object. Specifically, we need the 'death' function.
physics name myDeath ## Name of physics driver. death You Died! ## Message displayed on death. end
Then you add the reference to the object or mesh face:
phydrv myDeath
World Weapons
How do I add automatically-shooting weapons in my map?
See World Weapon. You can configure the weapon to fire on a flag capture, like on all your favorite CTF servers.
Starting a Server
How do I start a server to host my map?
http://my.bzflag.org/bb/viewtopic.php?t=2915
Getting Your Map Out There
There is a forum dedicated entirely to this on the BZBB. It's the 'Map Releases' forum. Please bear the following in mind when you release your map.
• Releasing you map does not necessarily mean you will get hosting for your map, so do not post "OMGZ this map is sooo good i spent like 2 hours making it and it's like amazing all my friends think it rawks!!!!!!11". It's not going appeal to many people. Instead give about a paragraph to describe your map, and any server settings you may recommend for playing. Be sure to use full sentences, and check your spelling!
• Extensions, extensions: you should always give your map the '.bzw' file extension, text edited or otherwise. It dosn't matter what you made it in - it's all the same format. It's just good practice.
• Give your map an imaginative name - not just "xyz's CTF", and not something obvious like "Bridges" or "Castles", as there are probably about five other maps with this title. Instead think of something decriptive and short. Think as though you were titling a movie or a song, something that's going to be attractive to people browsing the forum or listserver.
• Take nice screenshots using the roaming feature in observer mode. Most people will use only the screenshots to get an idea of how well your map will actually play. Try to capture the essence of your map with as little screenshots as possible, no more than three or four, and (if you can) convert your images to JPEGs for faster downloading.
• Furthermore, releasing your map means that anyone can download your map. If they decide to host your map they don't have to make you an admin on their server. If you have any issues with the way they are using your map take it up with them personally. It's not up for public discussion. See this announcement for more information on releasing and licencing in this forum.
• Be open and ready for criticism - if you're new to mapping, the chances are that your map isn't going to be a smash hit, so don't be too offended if somebody doesn't like it. Instead take that criticism on board and use it to improve your map, or to make further maps better.
Getting Help
If you're looking for some further help with BZW, you can post a question on the BZBB forum, or you can always try the ##bzw IRC channel on irc.freenode.net. Make sure you've searched this Wiki thoroughly first - probably 80% of issues can be resolved with information from this site.
Lastly, have fun making maps. Many players enjoy mapping even more than actually playing the game, and find it an ammusing and challenging passtime. Just remember to persevere, and with some work, you could be the next Dutchrai or Louman!
See also
Map Editors
| BZEdit | BZEditWin32 | BZFed | BZWTools | DI-Machine |
| IBZEdit | Modeltool | PyBZEdit | Wings3D |