Released projects
In development
Extra stuff



Lezing's DN3D Resource»Released projects»LEBuild 1.0.x

LEBuild is a Duke Nukem 3D level editor written from scratch in Visual Basic 6, meaning that it runs under Microsoft Windows. I've been developing it from mid 2004 till late 2008. No code from the original Build editor was used, some stuff (like texture mapping) was done through reverse engineering. The fundamentals of my editor are batch editing and the total control over the map. Otherwise this is to be an alternative to BUILD editor for DOS with a multilingual GUI and extended sector/wall/sprite limits.

I had installed Mapster 0.40 in 2004, when I was finishing the CROSSROADS. After releasing that map, I had some ideas for making a total conversion, but Build based editors didn't satisfy me anymore. I should invent a way to realize the full potential of Build mapping, so I decided to create a completely new map editor. Visual Basic 6 was the only programming language I was using at that date.

LEBuild's logo used since the version 1.0 Final.

Versions

Release date Version Comments
October 29, 2005 Beta 1 Very buggy, most tools are incomplete.
April 16, 2007 Beta 2 Vastly improved.
March 1, 2008 v1.0 Final Improved GUI and 3D mode, lighting tools completed, scripting system introduced.
July 6, 2008 v1.0.1 New scripts; many little improvements.
September 21, 2008 v1.0.2 A lot of bugs fixed.
December 25, 2008 v1.0.3 Current version.

Download

LEBuild 1.0.3 is the latest version, released on December 25, 2008. I don't plan to continue developing VB applications. The International version has only the English GUI. Another version having both English and Russian GUIs is available on my Russian site. If you're looking for the source code, download it here and place into LEBuild's executable folder.

LEBuild 1.0.3 International version (2.52 Mb)
LEBuild 1.0.3 source code (VB6) (336 kb)

Features

The internal software renderer used for the 3D view is polygon-based and allows to observe the map from the outside.

Various objects can be edited in a separate way by way of six modes of selection: sprites, vertices, walls, sectors and loops, as wells as sprites and vertices together. Each mode domains its own set of tools and commands. The two additional modes called 'figured sector modeling' and 'additional functons' provide some more useful instruments. The display options are placed on a separate toolbar; they enable to hide unnecessary objects.

The grid may be formed by parallelogram-shaped meshes when "affine grid" mode is activated. This denotes that an affine transformation is applied to the grid. Such grid can be rotated or moved off from its standard origin.

LEBuild can perform boolean operations over sectors using variations of the Weiler-Atherton algorithm. Aside from sector joining, there are intersection and subtraction tools. Note that such operations are done in a 2D fashion, not considering Z coordinates.

Farther, LEBuild has an unique scripting language with a built-in code editor. Scripts can perform any manipulations over the map. Though, the scripts may be a bit intricate to write because all variables are ranged from r00 to r99 and cannot be renamed.

The tile browser is similar to one in Build, but it's supplemented by a texture search tool which can significantly speed up searching a certain texture. Search criteria include tile dimensions, a name, presence of transparent pixels and even a prevalent hue.

There is a demo recording system. Making a demo is a good way to illustrate how one can make certain things using the editor. Unfortunately, many operations may look too implicit because they are done via hot keys; besides, scripts are unavailable during a demo.

The editor contains a map error detector that helps fix corrupt maps. LEBuild is free software; its source code is available on this page in order to let VB6 programmers continue this project.

LEBuild working in textured 2D mode.

Excessive (obsolete) tools

Certain tools accessible from the figured sector modeling mode usually give results of quite low quality. The reel (pipe), arch- or sphere-type structure generators make the sectors to have different widths resulting in wall texturing problems. In contrast with this, extruding and revolving tools are much more useful, especially when coupled with the scripting system.

Section Z-view. A comparison between tubular structures created by the built-in tool (left) and the "Prepare integral-width arch" script (right). The right one has equidistant sectors what allows making frontal walls textured properly.

Also, the landscape generation tool represents a height map as an uniform triangular grid with lots of additional loops outside it required for setting up proper slope directions. This is slow and wall-wasting compared to more practical isoline-aligned landscapes like in KaiseR Land 03 by KaiseR.

The wall autoshade tool used within the wall selecting mode became obsolete when a more complete lighting system was developed. The new shade determinaton tool can work in different selection modes and light up anything on the map.

Drawbacks

Using mostly 2D mode and Z-views for all the level geometry may require a specific skill and good spatial sense to be used effectively. In the start of development, LEBuild wasn't even supposed to have a 3D mode, until I was able to write my own 3D engine with a converting routine involving some reverse-engineered formulae to make a proper look of a polygonal map representation. Compared to Build-based editors, LEBuild's 3D mode has very low performance and quality because it uses no portals and everything was written using VB code. Unfortunately, the 3D view doesn't support adjusting altitudes or slopes of floors and ceilings.

Unlike conventional vector drawing applications, there's no bezier curve support, although the quadranglular transformation can curve a straight diagonal line split into several walls. Also, scripts can perform any operations (an important exception is player's start position assignment); the only disappointment is the inability to design custom interfaces for scripted tools: all the needed parameters must be set in the beginning of each script as regular variables.

Build editor was valued by modders as a simple and all-sufficient tool. Despite its limited capabilities, many good maps were created in it. LEBuild is an approach to higher-class editors like UnrealEd, so it was proposed to be used by Build enthusiasts wishing to extend their creative capabilities. Other people may find this editor too complicated for practical use.

Maps created with LEBuild

I used this application to make the Last Pissed Time; it's a 100% LEBuild map. My part of the first Russian Community Build Project was made in this editor as well. Besides, REEL.MAP released with The CROSSROADS Series was created in LEBuild beta. Another maps utilized LEBuild somehow or other include Sunshine Complex by Eddy Zykov.

Forum threads

Alejandro's Mapping Center: http://www.amcwebforums.com/smf/index.php?topic=7956.0
3DRealms: http://forums.3drealms.com/vb/showthread.php?t=30704

Comments on the test maps

I included a bunch of example maps into the archive. Several "maps" placed into the "Stub" directory aren't supposed to be launched in Duke. The rest of the maps is listed below.

TORUS.MAP An old map featuring a sprite array forming a torus. One can walk inside it.
RELIEF.MAP An old attempt to make volumetric textures. Using textured 2D mode makes this pretty easy.
LIGHTIN9.MAP A lit scene made manually. Only the walls were shaded automatically.
TRAINDEMO4B.MAP Two-way train demo, a simple timer.
TRAINDEMO6B.MAP Two-way train demo, one more timer.
TRAINDEMO7C.MAP An analog clock made using a lot of two-way trains. The trains are hidden.
TOWERX5.MAP A dome with strict shadows and a 3D entrance.
REVOLVE2B.MAP This room was created using the revolving tool; then strict shadows were modeled.
CONE3D.MAP Some round section pipes. The bevels are made by means of sphere slicing. Similar geometry was used for the circular tunnel in my part of the first Russian Community Build Project.
DROPSHADOWTEST2H.MAP Semi-automatic lighting example with four omnidirectional lights.
MODERNCIRCUS1C.MAP Some geometry. A similar shape was used for the Last Pissed Time central window.
RTW5B.MAP A translucent water example. This one can't show underwater sprites from the surface.
RTW6E.MAP A translucent water example, first seen by me in some tricky tutorial by Devastator. Above-water area isn't accessible there.
RTW5F.MAP One more translucent water example, capable of showing both underwater and surface sprites. This style was utilized in the Last Pissed Time pool.
0xBAD0.MAP A complex sprite ring with a manual shadow.
HEXMAT.MAP A heavily decorated ceiling created using boolean operations.
HEXWIN.MAP A space greenhouse, quite atmospheric. This one can be a stub for a DM map. This map has a bug when played in latest EDuke32 versions: the player doesn't teleport from the starting sector. Apparently, this is caused by vertical (not facing) orientations of the teleporter effectors.
TOWERG.MAP A tower with manual shadows. The shading itself is mostly automatic, handled by a light emitter sprite (hidden one on the ground).
RELIEF2.MAP Introduced in LEBuild 1.0.2 release. Some more 3D textures. =)

Troubleshooting

Extracting a newer version over a previous one (into the same directory) may cause incompatibility of data files. The distributives do not contain the "lebuild.cfg" file, having "default.cfg" instead. You may need to delete the configuration file already placed in the "LEBuildD" directory.

Some antivirus programs may report LEBuild.exe as containing malware (a dropper) even if it doesn't.

Despite LEBuild's wall limit of 32768, EDuke32 can't domain maps containing more than 16384 walls due to Build engine limitations. So, if you create a map exceeding 16384 wall limit, it will run neither in EDuke32 nor another Duke port.

LEBuild may crash during the initialization if supplementary data files (NAMES.H and others) have non-standard content (such as "#define" sections separated by multiple spaces).

Keyboard commands may work wrong with some keyboard layouts. LEBuild was tested with English and Russian layouts.

See also