Contents

The plan

The first thing to do is to make some plans about the map. Then we just make the map to fit the plans. How about this kind of a map? It has rectangular, triangular and circular walls as well as a wild flag.

Map information

We start the “coding” by adding the basic information about the map. Our map is 3×2 rooms. The title is simply Tutorial and I am the original author of the map.

Then there is the scale. The original 1×1 scale is quite confusing because a 0.1×0.1-unit sized wall is not square. We set the scale of 16×12. It means that the room is 16 units wide and 12 units high as it is seen in the picture.

P width 3
P height 2
P title Tutorial
P author Huntta
S 16 12

First rooms

We see that the three upper rooms are quite similar. They all have walls on the left, right and top edge. We shall make three rectangular walls. The first one starts at the top left corner and continues to the right edge of the room with 1 unit in thickness.

:basic
W 0 0 16 1
W 0 1 1 12
W 16 1 15 12

The blue and red bases have a round wall and two walls at the bottom of the room.

:base
W 1 11 5 12
W 15 11 11 12
C W 8 4 4 3 90 270

The circular wall is at point (8, 4), its outer radius is 4 and inner radius 3. We just want half a circle, starting at 90° and ending at 270°.

Those commands by themselves don’t do much. We need the X commands before those to specify the rooms where these walls will be created. The basic room type needs to be in rooms (0, 0), (1, 0) and (2, 0).

X basic 0 0 2 0
X base 0 0
X base 2 0

At this point we have walls in three rooms.

The rest of the rooms we have to make one by one. Let’s take next the room between the bases. We just need to add two rectangular walls there.

R 1 0
W 5 4 6 12
W 11 4 10 12

R 1 0 makes the next commands affect room (1, 0). Then we make two walls from the middle of the room to the bottom edge.

More circular walls

Now to the room below the blue base. It has round corners and a circle in the middle.

The second line is the circle in the middle of the room. The corners are parts of a ring, 90° each, made in the next four lines. The inner radius of the every corner is 3. The outer radius is big enough to reach the corner of the room area.

We need to add some rectangular walls to the left, bottom and top. Add the following code to the room (0, 1).

W 4 12 12 11
W 0 4 1 8
W 4 0 5 1
W 12 0 11 1

The first line is the wall at the bottom hole and the second line at the left hole. The two last lines are squares to make the top walls match the ones in the blue base room.

Triangular walls

The room below the red base will mainly be made of triangles.

R 2 1
T W 8 4 8 8 6 6
T W 8 4 8 8 10 6

This code makes a diamond using two triangles in the middle of the room. The first line is the left triangle and the second is the right one.

W 0 12 16 11
W 16 0 15 11
W 0 0 5 1
W 15 0 11 1
W 0 1 1 4
W 0 11 1 8

These lines make six rectangular walls as the outer walls of the room.

The flag and spawn points of the blue team (team 1). The coordinates are the same as for the red team but the room is obviously different. Here is a picture of the blue base where you can see the flag and the spawn points.

flag 2 1 1 8 6

This adds the wild flag (team 2) in the cover in room (1, 1).

Textures

To see how the textures work we change the ground texture at the wild flag cover. Add the following line to room (1, 0). The texture ID is 1 which means an alternative ground texture.