Build your own RPG Game

Documentation Home > Java Map Editor

Installing the Map Editor
Making new maps
Saving maps
Editing existing maps
Uploading map files to your server
Testing your Map
Map Editor and Map Problems

Installing the Map Editor

Download Java Map Editor (ZIP, 184 kb)

Download the map editor zip file to your computer's desktop. Unzip it so it leaves a folder called mapeditor on your desktop. Copy this folder to your C: drive main directory (the same directory your Program Files folder is in).

To run the map editor - double click the mapEditor.jar file. The program will load up in a window and show you a default map.

What you're looking at is the starting map. When the Java applet loads a map, it's made up of two layers - a lower map file and a upper map file.

Lower Map file: contains tiles like grass, stone pathways, etc. The player can walk through lower tiles.

Upper Map file: contains tiles like trees, bushes, houses, signs, and building parts (tables, beds etc). The player can not walk through upper tiles, they will have to walk around.

Here's some keys you can use to select different map tiles:
Arrow keys : navigate the map
Space: switch lower/upper tile
Page down : next tile
Page up : prev tile
End : fast next tile
Home : fast prev tile
Right click : select tile
Left Click : put tile
Ctrl + S : save your map

When the map editor first starts up, the lower tiles are shown in a little white square on the right hand side.

For example: to make a stone pathway, hold down the left mouse button and drag your mouse around. If you make a mistake and want to place some grass in a spot where a stone tile is - right click on a grass tile, and then left click on the stone tile you want to replace.

Fiddle around and make some stuff and check out all the different tiles available. If you want to see the full PNG files that contain all the tiles, look in the images folder at ChipSet files.
Top


Making new maps

When you want to make a new map, go into the defaultMap folder. In this folder is a folder called clear. This is a map with no upper map data and only grass on the lower map.

Copy and paste these files into the loadData folder. Then start mapEditor.jar. You will see a map with just a bunch of grass.

Now you can use your mouse to place tiles on the map. It took me a bit to get used to making maps and how to quickly pick tiles I've already placed and place them elsewhere - so I didn't have to scroll for them all the time :) It's really quite a cool little editor. Thanks PauPau!
Top


Saving maps

When you want to save your map, click the Control key and the S key. Two files will be written to the mapEditor/ folder where mapEditor.jar lives. The files are called lower.txt and upper.txt.

I recommend saving often just like when you use any other program on a computer. The map editor is a Java application and can become unstable from time to time and crash.

When I save maps, I put them in their own folder so I can work on multiple map levels and keep the text files straight :)
Top


Editing existing maps

Copy your lower and upper text files and paste them into the loadData folder. These files must be named lower.txt and upper.txt. When you start the map editor these two files will be loaded so you can edit them.
Top


Uploading map files to your server

When your map is ready, you'll want to upload it to the server. Open up WSFTP and connect to your web account. On the left side of WSFTP click the green arrow to navigate to your map data files (lower.txt and upper.txt).

On the right side of WSFTP, use the green arrow to navigate to inside your v2/maps folder. Copy the map files across in ASCII mode. This will make sure the text file line breaks are left alone.
Top


Testing your Map

To test your map, upload the lower and upper files to the v2/maps folder on the server, in ASCII mode with WSFTP. Then go to your setup.php file and change the startMap, startX and startY values to fit your map numbers and coordinates.

Make a new character and see if the map works - it should, you can't do much wrong when making maps.
Top


Map Editor and Map Problems

The mapeditor.jar won't run on my computer

Does the game demo applet work for you? As far as I know you don't need to have any Java installed otherwise. The map editor runs on its own and everything it needs is contained within the .jar file. Visit the GTGE web site and see if others on the forums have had this problem.

Do you have the map editor folder in your C: drive. When you double click My Computer on your desktop, and then double click your C drive - this next folder (where Program File lives) is where you should copy the mapeditor folder to. The map editor program will not work if it's not installed to this exact folder on your computer. So it won't work if you're running it right from your desktop.


I get an error when I load the map data files I created

Did you open the lower and upper files in Textpad and mess with the values? I don't recommend messing with these files unless you make a back up copy first. I don't what advice to give, other than make the map again, and make back up copies in the future.


I placed a upper tile item (like a tree) and don't know how to remove it

In the list of upper tiles there is the first tile that is a transparent one. You can place this tile over the spot where you want to remove a upper tile (like a tree). I did this where I made a pathway and then placed trees around the area and accidentally placed a tree over two spots on my pathway! So I used the transparent upper tile (which I think actually removes the upper tile entry and makes it whatever the lower tile is) - so the player can walk over it.

Visit www.createorconquer.com