Mapping Tutorial

Mapping - Part II: My First Map

Okay! Now let us start with our first map!

That will start the map editor with a blank map. You could now start filling it but it is recommended to create a new map with your own settings instead.

This opens the following menu! Don't be confused. I already changed the values on the following screen.

Map Size

Selecting the right size is important for the minimap. Your minimap will look pretty stupid when you have large unused areas in your map! Moreover it's a waste of space and memory to make a map bigger than necessary! Our first map will be pretty small. We use a 10x10 tiles map with scrolling water as background and the 'aztec.bmp' tileset.

Note that the size is defined in tiles. One screen (850x480) can display a map area of 26.5x15 tiles (850/32 x 480/32)! 'Tileset' and 'Background Image' are both simple image files. A tileset has to be selected but the background image is not necessary. You can also select a background color. This color is only visible if you do not use a background image. The default background color is black.

Scrolling Options

Moreover there are some scrolling options. They allow you to scroll your background image. Of course it doesn't make sense to enter something here when you do not even use a background image! The two numbers define how fast and in which direction your background will be scrolled:

The checkbox 'Scroll background like tiles' connects the backgrounds with the tiles. This means your background will be scrolled as well when you scroll the map. Hint: It's hard to see the difference with a scrolling background in the editor so you should test this option in-game at the next opportunity!

Enough about these settings! Let's click 'Create' to generate a new map!

You should now see something like this:

Note that there is a new background (which scrolls!) and that the tileset has changed! You also have a very tiny minimap now. The area without grid is 'outside' your map. You can't set tiles in this area but you are allowed to create entities there.

Scroll to the Center

Let's scroll to the center!

You should now see the whole map surrounded by water without grid! If not: Try again and make sure that your map has a size of 10x10 tiles!

Drawing Tiles With The Pen Tool

Now we will set our first tiles!

Hint: Point at a tile in the list for a short while to see its number + its properties!

Now draw a row of tiles as you can see it on the screen! Keep one tile free at each border. You should do that on each map. It avoids problems with map shadows and makes your minimap look better!

Take a look at the image on the right. That's how it should look like!

Did it work? If you 'painted' a wrong tile: Rightclick a tile without wall to select this tile and afterwards correct wrong tiles by left-clicking them! Alternatively you can use the undo function (Ctrl+Z)!

Drawing Tiles With The Rectangle Tool

It's not that easy to draw rectangles with the pen tools. Therefore we have the rectangle tool. It works this way:

The rectangle will be created in the area between those two points. You can cancel the process with a right click. After setting the first point you will see the size of the rectangle at the top of the screen. Moreover the area which will be changed is highlighted.

We will now test the rectangle tool! Use it to create the missing three walls!

Does your map look like the one on the screen? Good job!
Note that you see your big rectangle on the minimap as well!

Drawing Tiles With The Fill Tool

Two tools used. One tool left! Select the fill tool and a floor tile and afterwards fill the area in our rectangle!

This is what your result should look like:

Setting Spawnpoints

This is the principle of setting tiles. It's really easy as you see!

However we are not ready yet! CS2D can't work with this map because it does not know where to spawn players! That's the point where we have to take a look at entities! Entities are used to specify certain places and areas or to put cool stuff and effects in a map.

You will now see a long list of entities. For our map we just need two of them: Info_T and Info_CT! They are used to tell CS2D where it can spawn players. You can set as many of these both entities as you like - but be careful: You should place them on floor tiles inside your map only!

That's our spawn for the bad guys! We also need some police forces to fight those terrorists:

Now we created both spawns. Congratulations! Our first map is ready and functional! Note: If you point at one of the spawns you will see a yellow highlighted area. This area is buy zone where you can buy stuff!

Save Your Work!

All you need to do now is to save your map!

Done! Your map has now been saved and can be tested! Have much fun playing it! The fastest way to test it is the hotkey F12. The same key also allows you to return to the editor after testing. Hint: Use the prefix 'dm_' for 'Deathmatch' if your map does not contain a special goal (bombspot/hostages/VIP/flags etc.)!

Continue with part III where you will get some useful hints for making good maps!