Deliantra map making and server installation tutorial for Linux
So, you don't know much about deliantra and or programming, but you want to make maps? This Tutorial will explain how to install the Deliantra server (from CVS) on your linux system and making your first maps. If you are stuck somewhere, please contact us (the developers).
Note: I am assuming here that you are using a bash-like shell. And that you are logged in as root. If you want to install and setup everything from a regular user account you have to take care of all permission handling yourself.
Step 1: Getting the map editor and setting it up
Now download the editor! You can either install all the Perl modules and stuff by yourself or just choose the binary: editor download page. I'm not going to discuss the installation procedure for the CVS here, as it requires much knowledge about your system and how to install (perl) software from source. If you only want to make maps, the binary will do very fine (on x86 systems).
So, the next thing is to download the editor.
root@localhost: ~/deliantra# wget http://dist.schmorp.de/gde/gce-gnu-linux-x86.bin
There it is, now we make it an executable and run it:
root@localhost: ~/deliantra# chmod a+x gce-gnu-linux-x86.bin
Now we make a start script like for the server and run it Note: the first startup may take some while, the editor has to read all the archetypes and graphics.:
root@localhost: ~/deliantra# echo "CROSSFIRE_LIBDIR=/opt/deliantra/share/deliantra/ ./gce-gnu-linux-x86.bin" > startgce root@localhost: ~/deliantra# chmod a+x startgce root@localhost: ~/deliantra# ./startgce
Note: If you run into problems when starting the editor make sure you have gtk2, glib2 and pango and cairo libraries correctly installed. As i don't know your linux system you would have to figure out that yourself.
Note 2: If you are familiar with your system i recommend to set the CROSSFIRE_LIBDIR variable in your shells startup configuration.
Now i could let you run around for yourself, if you are planning to figure out stuff yourself now, do it, but make sure you find the manual of the editor in the toolbox window in the HELP menu!
But i guess the best thing is to explain now what to do, and how to do. The first things you will see is this:
Now open up 2 pickers, the stack view dialog and rearrange all the windows like this:
You notice that the pickers are still empty, go to the drop-down box on the top of the pickers and select 'wall' and 'floor' from there:
Now it's time to click the Save Layout entry in the File menu. It will save all the window sizes and positions. So you don't have to make all the layout work next time again. As you go on with map editing you maybe find other layouts more useful, try around, and of course: use more pickers. I mostly have 3-4 pickers open to do all the stuff i want.
Finished! You have now a layout we can work with. Go on to the next step:
Step 2: Making your first map
This step will introduce some tools and shortcuts you may use on a regular basis when making maps.
First make a new map. Go to the File->New menu for that an click on it. Next a dialog will open up, that will ask you for a map size. The default is 20x20. You can adjust that like you want. But we recommend not to make maps much larger than 50x50 or 60x60. It reduces the server load somewhat. Better use tiled maps or linked maps (with exits between them).
Click on the new button and the map editor will open up:
You recognize the ugly color on the backgrounds of the pickers and the map editor window. It's not configurable, and it's there to give a clear contrast to stuff on the map.
Note: You can scroll in the map editor window and the pickers by holding down the middle mouse button and drag it. (This is similar to GIMP).
Now resize the map editor window a little bit and select the Select tool from the left and draw a rectangle over the map with it. Next select a floor from the picker. The floor will appear in the attribute editor.
Now look in the toolbox window on the bottom, where the tool-controls are. There are radio buttons: place, erase and perl. Place executes the place tool on every cell in the selection and erase executes the erase tool on every cell in the selection. The perl thing is something advanced, it runs a small perl script on every cell in the selection, it's likely to go away some day (maybe).
Select the place radio button, and press the invoke button. The selection will be filled with the selected floor:
Next we are using the autojoining placement of walls, pick the "awall_0" tile from the picker with the walls. Make sure the place tool is in auto mode.
Note: In future when you want to use the autojoining placement you have to take care that the wall tile you are using to draw ends in "_0". But some walls, like the cave walls, are just not autojoinable. You will have to place them yourself.
When you picked the wall, just draw some walls like you would draw in a graphics program (like GIMP). Draw something similiar like you see in the screenshot. With some holes in the walls.
If you make a mistake while drawing the wall just hold the CTRL key to temporarily switch to the erase mode and erase all the bad walls and redraw the area. Or just Edit->Undo it. (Shortcut key combination for undo is CTRL+z and redo is CTRL+y).
to be continued...
Installing the server for testing the maps
Step A: Downloading the maps and the server from CVS
I assume here you have cvs installed. (the debian shortcut would be: apt-get install cvs).
Create a directory in your home where all your Deliantra (map) development should take place:
root@localhost: ~# mkdir ~/deliantra/
NOTE: the 'root@localhost: ~#' stands for your shellprompt, where '~' is the current working directory. And the ~ stands for your root homedirectory, if you are working as user 'root' your homedirectory should be something like /root.
Go into that directory:
root@localhost: ~# cd ~/deliantra/
Now, we are going to get the files, first the maps:
root@localhost: ~/deliantra# cvs -z3 -d :pserver:firstname.lastname@example.org/schmorpforge co -d maps deliantra/maps
And then the archetypes (needed for building the server, and could take a while):
root@localhost: ~/deliantra# cvs -z3 -d :pserver:email@example.com/schmorpforge co -d arch deliantra/arch
Finnally the server source itself:
root@localhost: ~/deliantra# cvs -z3 -d :pserver:firstname.lastname@example.org/schmorpforge co -d server deliantra/server
Now a ls -l should show something like this:
root@localhost: ~/deliantra# ls -l 1 drwxr-xr-x 39 root users 1192 2006-06-01 21:29 maps 1 drwxr-xr-x 39 root users 4096 2006-05-26 12:38 arch 1 drwxr-xr-x 17 root users 1072 2006-05-26 11:34 server
Step B: Compiling and installing the server
Start by going into the server CVS checkout directory and just call configure (the script that will find all the neccessary tools to compile the server). Please make sure you have development tools like gcc (gnu c compiler) and headers installed:
root@localhost: ~/deliantra# cd server root@localhost: ~/deliantra/server# ln -s /root/deliantra/arch lib/arch root@localhost: ~/deliantra/server# ./configure --prefix=/opt/deliantra/
The prefix argument tells the configure script to choose /opt/deliantra/ as installation destination. This is done to prevent the server installation from polluting your system and to keep all files together.
Next step is the compilation and installation of the server:
root@localhost: ~/deliantra/server# make install
That should build the sources and install them. If you encounter problems here you could try to contact us. If everythin went fine, there should be a /opt/deliantra/ directory now with files in it.
Next step is to link the maps into the installed server directory. First go back into the parent directory and then link the maps dir to the right location:
root@localhost: ~/deliantra/server# cd .. root@localhost: ~/deliantra# ln -s ~/deliantra/maps /opt/deliantra/share/deliantra/maps
Now everything is in place and all that's left is to write a startup script for the server:
root@localhost: ~/deliantra# echo "CROSSFIRE_LIBDIR=/opt/deliantra/share/deliantra/ /opt/deliantra/bin/deliantra" > startcf root@localhost: ~/deliantra# chmod a+x startcf
Note: The CROSSFIRE_LIBDIR thing is setting an environment variable which tells the server where to look for the configuration variables and the maps
Now try to shoot it up:
root@localhost: ~/deliantra# ./startcf
You should see lots of output running accross your screen. Congratulations, you just setup a Deliantra server. You maybe want to dive into the server tree and look around in the doc/ directory to find more about the server.