You are not logged in.

#1 2015-09-22 13:38:30

Registered: 2015-09-07
Posts: 33

Map Editor Basics


If the game starts, it will scan your home directory working folder (usually: ~/.goatattack) for unpacked folder structure and package files with a folder structure in it and then it scans the read only storage (usually /usr/share/goatattack) in same manner. The map editor does read unpackaged maps only. If you built your game from source, ensure that you compiled the map editor too. If not, reconfigure your package and build it again. Replace the 6 with the number of your CPU cores:

$ ./configure --enable-map-editor
$ make -j6
$ sudo make install-strip
Package file structure

To handle with pak files use the utility cargo, have a look here. If you want to inspect the files, copy this pak file to a temporary folder, extract it.

The base.pak has following directory structure:

  • animations

  • backgrounds

  • charactersets

  • fonts

  • game

  • icons

  • maps

  • music

  • npcs

  • objects

  • sounds

  • tilesets

For us, the most interesting folder is maps. If you want to work in the editor with that maps, copy this unpacked maps folder into your ~./goatattack and throw the remaining folders away.

Map editor basics

The map editor offers a tool window and works with keyboard command short cuts.

In the upper left corner, you see the x and y position of the centered cross. In the lower left corner, you the the current mode. In the lower right corner, you will see, what layers are NOT drawn.

Tool window buttons:

  • mode selector

  • center map

  • map properties

  • open map

  • save map

  • tile selector

  • object selector

  • mirror map

  • calculate lightmap

  • calculate accurate lightmap (pixel precise)

  • create map package (NEW)

  • zap map (clear map)

  • properties

  • quit map editor

The map editor works with layers. The decoration layer is similar to the map layer itself. We recommend, to switch between these modes while drawing the map.

Map properties

Before you begin, you should think about the size of you new map, what tileset you want to use and configure it in the properties page:
Choose a map name wisely. Follow the usual conventions. Enter the creator and a description of this map. The width and height correspond to tiles. Choose the map type.
We recommend to set the decoration brightness to 0.9 and the lightmap alpha value to about 0.85.

Moving the map

To move the map, grab the map by holding down the middle mouse button and move your mouse.

Working modes

There are three modes:

  • tile (by pressing the mouse button down, you can paint the current selected tile on the screen)

  • object (dito with the selected object)

  • light (you're able to place light sources for lightmaps)

By pressing TAB or clicking the working mode button in the tool window, you're able to switch through all modes.

Drawing layers

The map editor draws following layers in that order:

  1. decoration layer

  2. lightmap

  3. map itself

  4. objects

  5. light source icons

You can toggle that layer by pressing the number of the layer. for example: to toggle the objects and lightmap, press 4 and 2. Now on the lower right corner, you see, what layers are hidden:

Spawn points

In the objects selector window, you can see red and blue spawn points. In team game modes you have to place at least one of each spawn point in the map. For other game modes, it does not matter, what kind of spawn points are placed.


1 - toggle decoration layer
2 - toggle lightmap layer
3 - toggle map layer
4 - toggle objects layer
5 - toggle light source layer
d - toggle between decoration and normal drawing mode
t - toggle tile selector window
o - toggle object selector window
c - center map
m - toggle mirror mode

Create package

If your map is created, all lights are calculated, a preview icon is made, click on create map package in the tool window. Or create and publish your new package manually.

That's it for now. a tutorial video will be posted as soon as possile big_smile


Board footer

Powered by FluxBB