BZFlag map making tutorial. Part 2

Ok so you have learned the type of objects from part 1. Now its time to
show you positioning, and what better way to show you, than to make an
actual map. Its a map idea I've had for a while, where in both bases
reside on the same side of the map separated by a wall. I'll show you
step by step how I make this map.



First lets start with world and options.



You'll notice numbered lines on the left of the objects this is simply
line numbers for the map. it is not included in the bzw code.



world-options



As you can see its slightly smaller worldsize, 2 shots, acceleration
limits, and rico. Looks like a nojumping skill map.

Now on this map I'll add the bases first.



add bases







Ok I've added the bases, there is several things you should notice
about the changes in this bzw. Because of the added bases, in order for
bzfs to use those bases as intended we need to add "-c" now because we
added -c, we need to add "-mp". The reason for this is, if bzfs detects
the ability of a player to join in a ctf game mode without a base, it
will not allow this. so we added -mp.



This is the breakdown of -mp.



-mp rogue,red,green,blue,purple,observer



Those also are assigned numbers to associate with the bases, those
numbers are as follows.



team 0 = Rouge

team 1 = Red

team 2 = Green

team 3 = Blue

team 4 = Purple

team 5 = Observer



So if you notice the -mp from our current map, it will be a red vs
green CTF. Also if you notice the size of the bases and there position.
As you can see in the world object, the world size is 350 (default
world size is 400).  Lets take a closer look at the base.



base close up





Ok the position is at "300 -125 0" that is the center of the base, so
that means that the edge of the base is up against the wall at positive
X. If you see the "size 50 50 0". Something you should understand about
sizes of objects in bzw, the format of the size is "size X Y Z" X is a
mesurement across one direction of a bzw, Y is another, and Z is
height. I would go into how these measurements are different in bzw,
but lets save that for a later time, for now basics.





Now lets have a look at the map at this point in development, its
important when hand coding a map, each change you make to the code
should be followed by a test. The reason why you ask? Lets say i hand
code an entire map without a single test, if your object is wrong, in
the wrong place, it means starting over to fix it. TEST, TEST, TEST, and test some
more, really.



bases add map



As you can see its 2 bases on the same side of the map. It will work
out in the end.





Now in order to make this map playable, there should be a wall between
these bases, otherwise it could get pretty boring on this map. :-)

I'm going to start these wall thicker at the bases and graduate to
thinner as it gets away from the bases, this gives rico's a change at
being playable.



At this point of learning I would recomend you set your client for
coordinates.



while on the client simply do "/localset showCoordinates 1" this will
show your current position on the map, in the upper right corner of
your clients window, just under the time, notice the screenshot above.



box1 add





Now ive added a box between the bases. notice the X position.



Lets see the map.



box1 - map







Ok now I add the other boxs to make the wall that separates the bases
complete.



boxrow





Lets see how that looks on the map.



box row map





See the wall forces the tanks to go around the wall. Now the rest of
the map will be enhancing the basic structure, improving rico along
with a nice balance of disrupting bad ricos with pyramids.



Now to do this I will start the map add a few bots (there not smart at
all, but they provide interaction)



After some testing with bots, I have discovered that, there needs to be
a way to kill around the end of the wall with rico. So I added a thin
box to the end of wall.



endwall





Now lets take a look.



endwall map





Now after a lot of testing and the use of my random
map generator.


I made some major changes to the map, lets look at the changes.



1. moved the bases to the far corners. I discovered while testing this
was much more playable.

2. used the random
map generator
to generate the sides of the map, so the map can
change at a given time.



The map is too large to post a screenshot however you can see the
pastebin of the map.



lopsy.bzw





Screenshot:



finished map





This simple map was tested at least 30 times, The importance of testing
a map, however you decide to make it, is very important. The
information I am giving you is simply a guide, the ideas must come from
you.



and remember, TEST TEST TEST AND TEST SOME MORE.
You must make sure your map is playable.



Another tutorial coming soon  :-)



--ahs3

Comments