Help
Tutorial: Mapping
Parts
Beginner
Advanced
Mapping - Part II: My First Map
Okay! Now let us start with our first map!- Start CS2D
- Click the 'Editor'-button
Of course you can do it and it will work but you did not specify a size or a tileset or a background for your map! The size is very important so you should do that first:
- Click the 'New Map'-button
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.
- Enter 10x10 as size
- Click the 'Tileset'-field and select 'aztec.bmp'
- Click the 'Background Image'-field and select 'water1.jpg'
- Enter 1x1 for scrolling speed
- Check the 'Scroll background like tiles'-checkbox
'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.
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:
1. Value: X axis for horizontal scrolling. Positive values: scroll to the right, negative values: scroll to the left
2. Value: Y axis for vertical scrolling. Positive values: scroll to downwards, negative values: scroll upwards
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!
- Click the 'Create'-button
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.
Let's scroll to the center!
- Use the arrow keys or W/A/S/D to scroll to the center of your map
- OR Try to click at the center of your map
Now we will set our first tiles!
- Click the 'Edit Tiles'-button
- Click at 'Tile #1, Wall' in the tiles list
- Click the 'Draw Tile by Tile'-button (Pen Tool)
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!
- Click + Drag in the map area to draw the tile
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!
It's not that easy to draw rectangles with the pen tools. Therefore we have the rectangle tool. It works this way: 1. click: define the first point/corner of the rectangle
2. click: define the second point/corner of the rectangle
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!
- Click the 'Draw Rect of Tiles'-button (Rectangle Tool)
- Draw the three missing walls with 3 rectangles
Note that you see your big rectangle on the minimap as well!
Two tools used. One tool left! Select the fill tool and a floor tile and afterwards fill the area in our rectangle!
- Click the 'Fill Area with Tiles'-button (Fill Tool)
- Click at 'Tile #16, Floor - Step' in the tiles list
- Click into the center of your map to fill it!
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.
- Click the 'Edit Entities'-button (light bulb)
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!
- Click at 'Info_T'
- Click into the top left corner of your map with a floor tile
- Click at 'Info_CT'
- Click into the bottom right corner of your map with a floor tile
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!
All you need to do now is to save your map!
- Click the 'Save Map'-button (ATTENTION: SAVE! NOT LOAD!)
- Enter a name like 'dm_myfirstmap'
- Click the 'Save'-button
Hint: Use the prefix 'dm_' for 'Deathmatch' if your map does not contain a special goal (bombspot/hostages/VIP/flags etc.)!
Continue!