AlternativaEditor allows you to create levels (maps) for Tanki Online using special 3D-elements called props. Props are complete 3D-objects or its component parts, that you can use to create game locations.
Props are loaded into the editor in libraries. Props can be rotated around a vertical axis. The angle of rotation can be user-defined (any angle) or a multiple of 90 degrees.
Editor is made as an Adobe AIR application. So you need to download and install Adobe AIR.
Then you need to download, unpack a zip archive and install a file called AlternativaEditor.air. After the installation, you will see a shortcut on your desktop.
The interface of the editor consists of several parts:
- Main menu;
used to perform basic operations (import / export, editing, loading prop libraries, help, etc.)
used for switching the main options on and off:
- physical geometry;
- properties window;
- hiding props;
- Prop selection panel:
- props divided into categories and groups;
- Properties of selected prop.
To begin you need to load prop library. You can do that by going to Library → Clear and Load and specifying the root folder of the library.
Once the library is loaded, on the right in the pop-down menu you will see categories and groups of props.
Approximate structure of the library
The prop library is presented as a structure of folders containing files of models (3DS) and textures (JPG) as well as library.xml files.
There is the following hierarchy in the library:
- Categories of props (buildings, fences, terrain, etc.)
- Groups of props - component parts of complex elements (bridges, groups of rocks, etc.)
- Separate props
- Groups of props - component parts of complex elements (bridges, groups of rocks, etc.)
Geometric props describe fixed geometry of a level. They are 3DS-objects that have rectangular cross section in the base. The sides of it should be multiples of grid horizontal spacing (5 meters). If props contain terrain slopes the height difference between the borders should be equal to grid vertical spacing. Each geometric prop can contain a child object defining the geometry for collisions with tanks. This kind of object should be a box, a center of which is located at the origin of the local coordinate system. The axis of the box should be directed along the axis of its local coordinate system.
One prop can have several textures which you can choose in the settings menu.
In order to save memory some props are represented as sprites – flat objects that are always deployed to the camera. For example trees and bushes.
When constructing a map, sprites should be added last. First you need to test the main geometry to make sure there are no problem areas and take into account all the nuances.
By default, all elements are snapped to the grid. This may be an obstacle in case of sprites and functional elements. You can turn it off by clicking on magnet icon on the toolbar (). Sprites may disappear on subsequent boots. This is due to the problems with sorting in the editor. It may happen that they will be displayed under the surface of which they are placed.
This problem may be solved as follows:
- Choose in the upper bar;
- Select all sprites;
- Drag them while holding V (vertical movement) to find the ideal position.
Just to make sure it doesn't happen you can add several sprites for each height level. Then you can adjust the height as it was stated before and simply copy sprites. The correct height will be saved. When doing this it’s necessary to switch off the snap function.
Spawn points and bonus zones
Spawn points define where tanks appear and which way they are facing. There are three types of spawn points: yellow which are used for DM battles as well as blue and red which are used to specify the places where tanks of two opposing team appear in team battles (TDM, CTF, CP modes). Spawn points must be placed on the ground level.
Bonus zones indicate areas where bonuses may appear and define the types of possible bonuses. The zones should be rectangular with sides which are multiples of grid horizontal spacing. The type of dropped items is defined in the properties window. Bonus zones should be located above ground, higher by 1-2 spaces. It is also recommended to create 25% more double speed drop zones than double armor and double damage ones.
Method of work
Adding a prop to a map
- Choose the prop you need to add. You will see a green translucent cursor showing where the prop will be placed;
- Move the cursor to the required place using mouse or arrow keys on your keyboard;
- You can raise or lower the prop to a desired level using W and S keys;
- The prop can be rotated around its axis using X and Z keys;
- Press spacebar to place a prop.
Once you've added a prop, the cursor will become red. Two props can't overlap each other (occupy the same section of the grid).
You can choose next element for adding or edit the current one.
Editing a prop on a map
To do that you need to click on the prop. After doing that it will be highlighted in red. Now using mouse and keyboard you can move and rotate it or delete it by pressing Delete or C. To copy a prop drag it while holding Shift. Press K to move a prop half a segment.
Also you can choose a texture for each prop. To do that you need to select a prop that you've added to the map, open the settings menu and choose a texture.
Tile props that are used to construct the level's terrain often have different textures.
If we add several identical props and apply a texture to one of them, you will be able to apply the same texture to other selected props by pressing spacebar. The last selected texture will apply to it.
Now a little more about the structure of these textures. All of them are made seamless. So they can be joined together without seams in any direction. There are 1x1 tiles (5x5 meters) as well as 2x2 (10x10 meters), 2x1, 3x1, 3x2 and 3x3 ones.
To move the camera you can use the middle button on your mouse. To rotate the camera use Alt+middle button. Use the scroll wheel to zoom in and out. When you choose a particular prop the wheel is more sensitive while the rotation is done around the highlighted object. To get back to the insert cursor without selecting a prop use Ctrl+click combination. You can select several objects in a frame, make sure you hold Ctrl not to select a prop under the cursor and not to drag it. You can add an item to selected ones using Shift+click, or remove it from selected by using Alt+Shift+click.
You can't put two elements on one place. If it happened accidentally while dragging you will see an error window with a suggestion to undo the last action. Also you can check whether any elements are overlapped by pressing Q. The conflicting elements will be highlighted in red. You can undo the last action and go a step forward using Ctrl+Z and Ctrl+Y.
Exporting / importing a map file
You can convert a map into XML at any moment. You can do it in the main menu File→Export Tanks map 1.x or by using Ctrl+T. When exporting a map you need to specify its name and add .xml format.
In order to import a map into the editor use File→Import from tanks or Ctrl+T.
Testing a map in TanksTestingTool
Before testing your map make sure there is at least one spawn point (a place where tank appears) for DM mode.
In order to test the results of your work you can open your map in TanksTestingTool. To do that you need to:
- Convert a map to XML;
- Call it map.xml;
- Move the file you got to Library folder with TanksTestingTool.swf file;
- Launch TanksTestingTool.swf
If everything has been done correctly, the map will be displayed.
Tank Testing Tool controls
|Move around the level in flight mode.||WASD, Q,E, Mouse Drag|
|Switch between flight mode and tank mode||F|
|Switch between tanks||N, Shift+N|
|Switch between different spawn points||T - type of point
Y - Next point
|Select turret||Numpad 7, Numpad 9|
|Select hull||Numpad 4, Numpad 6|
|Select paint||Numpad 1, Numpad 3|
Nuances and difficulties
First of all you need to place main geometry of a level (terrain, buildings, bridges, etc.). After that you install sprites (vegetation) and functional elements (spawn points, bonus zones, flags, etc.).
When placing spawn zones always make sure that the biggest hull won’t get trapped at the spawn point.
In the process of rendering the level is divided into blocks along the boundaries of props forming a hierarchy (level → large blocks (buildings, land, etc.) → even smaller groups in each block → individual props). At this point some difficulties may occur.
To avoid them, you need to ensure that there are at least several “joints” (boundaries between props) going through the whole level that are not interrupted by other props:
Black lines are "joints", the yellow line is not.
The more of these joints are on the map the better.
If joints that go along problematic buildings through the entire map interfere with other props, there are two ways to solve this problem:
- Instead of these buildings put walls, blocks or rocks (that have limited height and are within the grid limits vertically and are quite small horizontally);
- Try to make joints going along these large buildings through the entire level.
To make sure that the hierarchy is correct use the debug mode (Ctrl+B) in Tanks Testing Tool (props joined into groups are marked with green, problematic places are red). If something is highlighted in red, it means that:
- There are problems with sorting which were described before;
- There is a tank or a sprite in this place (that's why sprites must be added last, when the main geometry has already been built and tested).