Home
Screenshots
Downloads
Forums
Docs
Servers
Stats
IRC Chat
Mods
SpecialSpecial  SearchSearch  LoginLogin
Main Page -> Making a custom map

A step-by-step tutorial on creating a new map for scorched3d.

Making The Heightmap
In this part we will be making a heightmap based landscape, so step one is firing up your image editing software of choice, which should be URL The GIMP, as it not only rocks, but it is free and multi-platform. Create a new image (File->New), and set the size to 256x256 (can be any size that is a factor of 16)

s3_gimp_new.jpeg

You'll want to start out with a black canvas, as black denotes 0 height, so set the foreground colour to black, hit SHIFT-B to get the bucket fill tool, and click in the image to paint it all black.

We'll keep the drawing part pretty simple: Doubleclick the foreground colour in the toolbox to set the new colour, and slide the variance slider up so it's at about 40 or so. This will be our "maximum height". (Trust me, you don't want to use white, it will be VERY high!).

s3_gimp_variance.jpeg

Now hit A to select the Airbrush tool, then click the brush button in the toolbox to select a brush. (I selected "Sand Dunes"). Draw around a bit, making some areas lighter than others (lighter colour being higher ground), but try to keep away from the edges (Having light areas at the edges will result in ugly walls at the edges of the map).

After a minute of my best squiggling, I came up with this:

sanddunes.jpeg

Save the image as a .bmp to the data/landscapes folder.

XML Files
Now, in your favourite text editor (vi rocks!), open up the data/landscapes.xml file, and make a new entry like the following:

       <landscape>
               <name>MyNewMap</name>
               <description>Scorched3d Rocks!</description>
               <picture>oldstyle-pic.bmp</picture>
               <weight>100</weight>
               <defn>
                       <item>data/landscapes/defnmymap.xml</item>
               </defn>
               <tex>
                       <item>data/landscapes/texsahara.xml</item>
               </tex>
       </landscape>


We'll just use the default sahara texture for now. Eventually you might try tinkering with your own Texture_Files though.

However, we need to create the landscape definition file for our map. In your text editor, start a new file containing the following:

<defn>

       <minplayers>0</minplayers>
       <maxplayers>24</maxplayers>
       <landscapewidth>256</landscapewidth>
       <landscapeheight>256</landscapeheight>
       <surround type="none"></surround>
       <roof type="sky"></roof>
       <tankstart type="height">
               <startcloseness>20</startcloseness>
               <height><min>5.5</min><max>30</max></height>
               <startmask></startmask>
       </tankstart>
       <heightmap type="file">
               <file>data/landscapes/myheightmap.bmp</file>
               <levelsurround>false</levelsurround>
       </heightmap>

</defn>


Change the "myheightmap.bmp" to whatever you saved your file as, and save it as data/landscapes/defnmymap.xml.

More detailed information on Definition_Files is available if you're interested. For now, we're just keeping it basic.

Testing The Map:
Open up Scorched3d and click "Play". After the main menu loads, click on "Local Game" then to "Mod : Custom". Make sure the 'none' mod is selected, then hit "Advanced Options". Then, on the "Land" tab, select your new map, click OK and you're off to the races!

Your map will likely look MUCH different than mine, but here's what I got: s3_newmap.jpeg

Common Problems:
1. Errors when trying to select map: Likely a typo in the xml - note the first error that comes up, it often points you right to the line that is incorrect.

2. The map is all spikey: Either the image is too bright, or too "rough". Try bringing the brightness of the image down, or maybe applying a bit of blur to it. Also, if you want to get the levels of the terrain "just so", use the "Levels tool" to adjust the levels of brilliance (found in Layers->Colors->Levels). It's a great tool for adjusting not only the maximum height, but also to adjust the difference between the low areas and the highs.

3. It just looks awful: Scrap the image and try again! Most of mine are pretty bad on the first try or two ;)

More Info:
You can find more info on all the landscape files here.



Edit this pagePage historyWhat links hereRelated changes
Problem Mortgage | MPAA | Car Loan | Loans | Mobile Phone
Safe
OpenGL Supporter Available for Linux Available for Windows Available for Mac Available for Solaris Available for Gentoo Available for Debian Available for Slackware Available for FreeBSD
Donate to Scorched3D Visit Scorched3D at SourceForge.net Get it from CNET Download.com! 5 Stars
© Copyright 2008 Gavin Camp. All Rights reserved.