Map editor

Started by
5 comments, last by BrianJensen 12 years, 8 months ago
Hey. Not sure if this would be the best place to post this but anyway. I'd like to know if I can export map/txt files using Mappy or any other map editor that will look like this.

Example:

3 Tiles clips from a image.png coresponding to a number:

tile_1 = 1;
tile_2 = 2;
tile_3 = 3;

And the text file will look like this, every number coresponding to the respective tile.
1 1 1 2 2 2
2 3 1 2 2 2
3 3 2 2 2 2

I can do this in notepad but it takes a lot and also mistakes can be made pretty easy.
Advertisement
How about Excell? Then copy/paste into Notepad?

How about Excell? Then copy/paste into Notepad?



In mappy you can load the tiles images, and place pictures on the screen. You don't type numbers, you just place the pictures you want to create the level. But I'm not sure how I can export that in the format that I want.
I mentioned Excell because you can easily copy data and you can copy/paste in a format like
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
(tabs between the numbers).

When I was about 12, I made a whole heightmap with Excell (256x256 if I recall correctly)
I use mappy all the time, makes making maps really easy. Once you export as text if you want that format where it is just the numbers just open with notepad remove the initial

const short tt_map0[100][100] =

then find/replace all "{" with "" and "}" with "" and "," with "" and ";" with ""
that will give you this look

73 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
74 74 74 75
79 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 80
79 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 80

spaces between each, though I would keep the "," so you can easily signify a new tile, you can also post it directly into your source when you first export as text with minimal changes, which is the preferred way.

Sprite Creator 3 VX & XP

WARNING: I edit my posts constantly.


I use mappy all the time, makes making maps really easy. Once you export as text if you want that format where it is just the numbers just open with notepad remove the initial

const short tt_map0[100][100] =

then find/replace all "{" with "" and "}" with "" and "," with "" and ";" with ""
that will give you this look

73 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
74 74 74 75
79 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 80
79 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 80

spaces between each, though I would keep the "," so you can easily signify a new tile, you can also post it directly into your source when you first export as text with minimal changes, which is the preferred way.



Where do you specify the number of each tile?


Where do you specify the number of each tile?


That is done automatically with mappy. First tile on the tile sheet at (0, 0) = Tile 1. (0, 1) = Tile 2. And so on down the sheet. With mappy you can even remove unused tiles to make the tile sheet smaller in size, or join more than one tile sheet(assuming they are the same size tiles) together and export as a single big image. Mappy also has collision code that you can export, trigger code as well. Lots of stuff. I think mappy has header files for SDL. I know it does for allegro cause I use mappy all the time with allegro. I have to do some minor editing for it to work with java and there isn't a native library like for C/C++ but even then it works well.

Sprite Creator 3 VX & XP

WARNING: I edit my posts constantly.

This topic is closed to new replies.

Advertisement