Tool: MapEd Pro

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

User avatar
never-obsolete
Posts: 380
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ

Tool: MapEd Pro

Post by never-obsolete » Fri Oct 29, 2010 8:35 am

Here is a tile based map editor that I started some time ago. I add features as I need them, and its gotten to the point where I think others might find it useful.

Features include:

-metatile formats:
2x2
4x4, 4x4(2x2)
8x8, 8x8(2x2), 8x8(4x4), 8x8(4x4:2x2)
data can be sequential or interleaved

-metatile properties:
can be 1 to N bytes per metatile. these have no use within the editor, it's up to the programmer to determine what they are used for.

-map formats:
screen or area based
"screen": measured in screens. size of a screen is customizable
"area": measured in metatiles
data can be in rows or columns
data can be compressed with RLE, LZ77, or LZSS (variations denoted by the "a" or "as" suffixes).

-chr:
supports multiple small files (min size = 1K) or one big file
supports 1K, 2K, and 4K banking schemes

-palettes:
nothing fancy, 32 byte arrays.

The readme explains the formats of all the files the editor creates.

MapEd Pro.zip

Here are some demos I put together using different configurations. I recreated SMB's 1-1, CV2's Jova and Jova Woods1, and Ninja Gaiden's 1-1.

MEP Demo.zip

Bugs, comments, suggestions are welcome.

*Note: because of changes in the map format and a more flexible chr scheme, previous versions are not directly compatible with this one.


edit: uploaded v0.29.0
edit: uploaded v0.30.0
edit: uploaded v0.32.0
Attachments
MapEd Pro v0320.zip
(1.04 MiB) Downloaded 12 times
MapEd Pro v0300.zip
(1.01 MiB) Downloaded 410 times
MapEd Pro v0290.zip
(120.78 KiB) Downloaded 317 times
Last edited by never-obsolete on Fri Sep 04, 2020 7:38 pm, edited 6 times in total.

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox » Fri Oct 29, 2010 10:11 am

Seems really good! Has about all features that I would want from a map editor. So far I've been using Mappy with custom hacky LUA scripts to export the data in NES compatible formats, but your tool seems better.

One problem I noticed with the examples, the CV2 and Ninja Gaiden example files have absolute paths in the MCF file so had to edit them before I could get them to open.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

User avatar
Bregalad
Posts: 7951
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Fri Oct 29, 2010 10:15 am

Sounds like AWESOME to me !!
So far I always did my maps with .db statements.

EDIT : Only the SMB demo works so far for me.
Useless, lumbering half-wits don't scare us.

User avatar
never-obsolete
Posts: 380
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ

Post by never-obsolete » Fri Oct 29, 2010 10:23 am

thefox wrote: One problem I noticed with the examples, the CV2 and Ninja Gaiden example files have absolute paths in the MCF file so had to edit them before I could get them to open.
Whoops, I thought I got them all. Updated the zip with corrected files.

@Bregalad: It should work now, it was probably the same issue thefox was having.

UncleSporky
Posts: 385
Joined: Sat Nov 17, 2007 8:44 pm

Post by UncleSporky » Fri Oct 29, 2010 10:52 am

Finally releasing this, huh? :)

This is an awesome and very useful utility, one of the best I've seen for helping with new game creation. Of course metatiles are only one way to do things, but they are common and efficient.

Like a lot of other people I've got my game ideas that still haven't taken off, but I'll definitely use this when I get to that stage.

User avatar
never-obsolete
Posts: 380
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ

Post by never-obsolete » Fri Oct 29, 2010 12:43 pm

Yeah, I've been sitting on this thing for awhile now. I would end up adding something new, and not having the time to test it with all the possible configurations.

I bought Kirby's Epic Yarn yesterday, so it was either now or New Years... :wink:

User avatar
neilbaldwin
Posts: 481
Joined: Tue Apr 28, 2009 4:12 am
Contact:

Post by neilbaldwin » Sat Oct 30, 2010 1:31 am

Image

:(

I tried installing "Microsoft Visual Basic 6.0 Common Controls" from MS support site (searched for the error on the net) but that didn't fix it.

User avatar
Bregalad
Posts: 7951
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Sat Oct 30, 2010 9:10 am

Ok, to be honnest this editor sounds like revolutionary to me ! I always had to do my maps with pencil on paper, and port it to .db manually until now.
Then I had to check for erros in my .db statements (as I RLE compress the thing manually, so this is prone to errors).

The release of this flexible and NES specific tool was completely unexpected from me. I think I'll probably use it but I don't know for my current project as I started without it, and the exact compression format I use isn't featured so I'd have to either re-code decompression (including for older maps that I already encoded manually), or just finish my current project with the old method and use the new one for all my future projects.

EDIT : What is that proprety thing ? Collision detection ?

EDIT II : Sorry for the bother, but maybe the program should add more flexibilty / efficiency for compression. This could be left for another program but since compression is implemented I'd like to see it better implemented :
- RLE comression as used here is almost useless, because for every part of the map which is build with non-runs of metatiles, it will take a "lenght = 1" byte before it, which makes it terribly inefficient. There is several workarounds that would come in mind: Have one "run" flag in each byte, if clear it's a 7-bit litternal, and if set then the 7-bit litteral is followed by the # of times it's repeated.
Or you could have everything coded in 7-bit runs blocks, with the upper bit toggling between a block of a signle metatile, or a block of distinct metatiles.
Or eventually the solution I used in my game, the high 3 bits are the run size minus one, and the low 5 bits the metatile # (yes, I only have 32 metatiles to chose from).

The fact that you could use less than 8 bit for metatiles encoding should also be exploited in other compression shemes, especially those which are not byte aligned anyway (you don't want any useless '0' bits in your compressed stream).

The LZSS and LZSSa algorithms seems to produce exactly identical output to me.

The "export map to txt" feature seems to always export an uncompressed map (not that this feature is much useful anyway as you can just .incbin the binary map).

Finally, I guess in the case of screen-based maps, you'd want to stop the compression stream when the map is screen aligned, and be able to export pointers to each screens.
For area based maps, you'd want to do that for either rows or columns. The reason for this is to get a way to quickly acess the maps when scrolling, even with the compression.

In my project I have it screen based and stored like this for every level :

Code: Select all

MapPointers
.dw Level1Map1
.dw Level2Map2
.dw ....

Level1Map1
.db $xx, $xx

Level2Map2
.db $xx, $xx
(I call a Map what is called a Screen in MEP), and those also have an header to know which maps/screen it warps to in each direction.

If doing it with this editor, it sound painful to have like 40 ".map" files for each level, so maybe it's better to have a ".asm" file automatically generated with labels, pointers and .db statements. Then it becomes possible to manually add more data, such as screen headers.[/code]
Last edited by Bregalad on Sat Oct 30, 2010 10:19 am, edited 1 time in total.
Useless, lumbering half-wits don't scare us.

Ian A
Posts: 115
Joined: Sat Feb 27, 2010 8:32 am
Location: Maine

Post by Ian A » Sat Oct 30, 2010 10:18 am

Awesome! Thanks a bunch!

EDIT:
That's not much more than a 'me too!' post, but although I can't use it, I appreciate the contribution!

User avatar
koitsu
Posts: 4218
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post by koitsu » Sat Oct 30, 2010 10:27 am

neilbaldwin wrote:Image

:(

I tried installing "Microsoft Visual Basic 6.0 Common Controls" from MS support site (searched for the error on the net) but that didn't fix it.
Same. As a result, I'll pass. :)

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox » Sat Oct 30, 2010 11:26 am

Any chance that the UI could be improved in future versions? :)
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

User avatar
Dwedit
Posts: 4351
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit » Sat Oct 30, 2010 12:36 pm

I wonder if I should release the map editor I'm working on. It's in C#, and it's an abstract class designed to be inherited from. It also doesn't work on Windows 7 because I'm using Managed DirectDraw.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

User avatar
never-obsolete
Posts: 380
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ

Post by never-obsolete » Sat Oct 30, 2010 1:02 pm

@neilbaldwin and koitsu
Are you by chance running Vista or Windows7?

@Bregalad
Properties can be collision detection, or whatever you want. The editor doesn't use it for anything, it just allows you to associate data with your metatiles.

The difference between LZSS and LZSSa is that LZSS is bit oriented and LZSSa is byte oriented. I use LZSSa because the decompressor was easier to code.

Thanks for the comments on RLE and compressing screen based maps. I'll have to add those to my todo list.

@thefox
What did you have in mind?

User avatar
koitsu
Posts: 4218
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post by koitsu » Sat Oct 30, 2010 1:14 pm

never-obsolete wrote:@neilbaldwin and koitsu
Are you by chance running Vista or Windows7?
No. I run Windows XP SP3. You're not going to get me to "mess around" with random Visual Basic runtimes and other crap either. Sorry, I'm a total hard-ass about it; I Just Don't Do That. That's my own fault/problem/issue and not yours.

User avatar
Bregalad
Posts: 7951
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Sat Oct 30, 2010 1:18 pm

never-obsolete wrote: Thanks for the comments on RLE and compressing screen based maps. I'll have to add those to my todo list.
Thank you, hopefully a newer version with those will be released !!

I have the program running fine in Windows 7. I haven't installed any runtime libraries or wathever (at least to my knowledge).
Useless, lumbering half-wits don't scare us.

Post Reply