gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > MapEd v0.96 Uploaded

#10867 - Nessie - Thu Sep 18, 2003 6:50 pm

...

http://nessie.gbadev.org/

BTW, special thanks to gbadev.org for hosting the mapEd site. Very much appreciated!

#10927 - Nessie - Sat Sep 20, 2003 7:27 pm

One thing that was pointed out to me, by default the export is basically garbage!

I should have been more careful, but since the customizations you make are stored in the registry, my local settings made it look ok! Sorry about that.

Easy fix though, just go to the Customize option on the Export to .H dialog box...then import the mapEdExportDefinition.mdf. That should get you to a clean starting point with file exporting like mapEd v0.95. From there, you can alter it to suit your needs.

Cheers

#10967 - goro - Mon Sep 22, 2003 7:29 am

Thanks Nessie.

This program is great!!!

#10973 - tepples - Mon Sep 22, 2003 1:36 pm

Nessie wrote:
since the customizations you make are stored in the registry

Bad idea. Storing too much in the Windows registry makes it too hard to move a project from one computer to another or to have multiple projects on one computer. I'd have it store the customizations in a "project file" like MSVC does.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#10978 - Nessie - Mon Sep 22, 2003 4:50 pm

I'd disagree. If someone can click a button and import/export the definition, moving to a new computer is hardly any more difficult than what you've proposed.

#10980 - tepples - Mon Sep 22, 2003 4:59 pm

But then the user may forget to import or export things when switching between projects on a computer. I'd have it import/export automatically when loading a project file, but once you go down that route, why even use the registry?

And doesn't using the registry limit your program's portability and make it harder to offer a version designed to run on operating systems not published by Microsoft Corporation?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#11137 - Nessie - Sat Sep 27, 2003 5:09 am

..v0.97 uploaded.

See the included "help" doc for full list of fixes, new features, etc.

#11151 - Foz - Sat Sep 27, 2003 5:06 pm

Hey Nessie,

I was checking out your editor, but I think something is amiss. Perhaps I've done something wrong but when I tried to create a 256x512 map I can only view the top third of it. There are no scroll bars on the window for me to view the rest of the map. I'm using XP Home. I read that there is an issue with XP Pro, but I'm not sure if it included Home, also the issue didn't mention not being able to scroll.

It also occurred when I opened the sample file.

#11154 - tepples - Sat Sep 27, 2003 5:56 pm

Lack of a scroll bar would be a GUI issue. The differences between XP Home and XP Pro involve not the GUI but rather the underlying kernel: the filesystem features supported, the multiprocessing capabilities, the included server software, etc. The GUI difference is between 98/ME and 2000 or between 2000 and XP. Therefore, what applies to one version of Windows XP probably applies to the rest.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#11155 - abilyk - Sat Sep 27, 2003 6:27 pm

Foz wrote:
There are no scroll bars on the window for me to view the rest of the map.

No scrollbars, no. I was initially confused when I first used it too, until I read the documentation. Before worrying about system conflicts, etc. with any new piece of software, read the docs. Heed this advice and you'll save yourself trouble and frustration in the future.

the documentation wrote:
Middle Mouse Button ? ?Grab? and scroll the currently active layer.

As a suggestion for Nessie, though I like the grab 'n scroll functionality as you have it, some users may not have a 3-button mouse. You might consider adding an alternate means of scrolling.

#11156 - Foz - Sat Sep 27, 2003 6:28 pm

Okay. The middle mouse button "grabs" the layers, I'm just not sure how to move the layers together. And I found a zoom feature in the help file. Sorry, I'm just so used to scroll bars that the moment I didn't see them I figured I did something wrong.

Nessie,
When I "grab" a layer am I changing the view or the actual offset?

#11157 - Foz - Sat Sep 27, 2003 6:44 pm

You posted moments before me abilyk. You're right about reading docs. I do and I did. I have a problem with pre-mature posting ;)

This editor seems pretty nice. Nice job Nessie.

#11161 - Nessie - Sat Sep 27, 2003 7:24 pm

Someone already mentioned not liking to have a 3 button mouse, so as per the documentation, this was added for 0.97

Key Shortcuts ? The NumPad now can be used to scroll the map in 8 directions.

As a general rule I always list any new features or changes in the change log at the top of the help file. I also color code any new documentation changes so if people have read previous versions, they can more easily (I hope) home in on the specific changes instead of having to reread the whole thing.

v.98 might change the interface a lot, hopefully fixing any of the above issues and hopefully a few others, then again, it might not. Entity placement is something we need for our game so that will likely be the next thing I do.

[Edit] - I'll just show the changes here as well.

Version 0.97 ? added Export Layer To .BMP, PCX Tileset Loader, ?Solo? Active Layer, Show All Layers

Enhanced ? BMP (tileset) loader now supports 16 colour uncompressed .bmp?s.
Enhanced ? Undo handles Add, Clone, Delete, Flip, Shift, & Shuffle Active Layer operations (NOTE: Resize is the only one that doesn?t work yet).
Enhanced ? Number of undo levels can be adjusted via File->Settings?
Enhanced ? Drag ?n- drop?can drop multiple tileset files onto the workspace window to add them to the project.
Key Shortcuts ? The NumPad now can be used to scroll the map in 8 directions.
Fixed ? Better validation of .bmp files.
Fixed ? Misc. undo bugs, mostly related to loading a new map.
Fixed ? Collision tile index wasn?t being written properly when customized.
Fixed ? Menus had some inconsistencies and broken accelerator keys.
Fixed ? Trailing comma?s on last data element no longer exported.
Fixed ? Export To .CLL menu option wasn?t enabling correctly.
Fixed ? If a .CLL is being constructed, quitting or loading a new map triggers an ?Export .CLL?? request.
Fixed ? Update Active Tileset was not altering palette information correctly, causing bad palette exporting in some cases..

#11164 - goro - Sat Sep 27, 2003 9:00 pm

Thanks again for the best map-editing software available.

#11177 - Nessie - Sun Sep 28, 2003 7:06 am

Huh, freaky. Just got a weird crash, so I rebuilt the whole project and it seems to be better?! Odd, but anyway, I uploaded a fixed build, though I'm not even sure if the old .97 build I uploaded yesterday exhibits the problem.

I did start redoing the UI, so the tileView window looks different now in the newly uploaded version...once that's completely done, I can more easily add scrolling to the TileView window.

Cheers.

#11188 - yaustar - Sun Sep 28, 2003 5:42 pm

Can youe map edit export to 512x512 maps, because it only seemed to export a 1/4 - 1/3 of the data. Also I had a wierd crash as well, it happened when I right clicked on the map edit screen.

confused the heck at of me
_________________
[Blog] [Portfolio]

#11189 - Nessie - Sun Sep 28, 2003 7:02 pm

That was the crash that I had, I'm guessing. If you've downloaded the new build and it still crashes, well, please let me know exactly what happened. I haven't been able to reproduce a crash this morning.

Regarding your 512x512 map, I just did a test map and it exported the full 512x512 map. My test also had a secondary layer at 0.5 parallax, which creates a layer with dimensions of:

/* width: 271 height: 266 parallax: 0.50 */

perhaps this is what you are seeing when you are thinking that it's not exporting the full layer?

#11190 - yaustar - Sun Sep 28, 2003 7:30 pm

no, there was only one layer. The new build still crashes unfortunately (thank god i have the 0.96 version hanging around)

Try flipping tiles, that was what I was going to do when the crash happenned.

btw, didn't know if you got the e-mail but it is a great program and I thank you for it!! :)
_________________
[Blog] [Portfolio]

#11192 - Nessie - Sun Sep 28, 2003 8:21 pm

hmmm, I'm flipping tiles like crazy and it's working correctly. any other info that might be relevant?

#11193 - yaustar - Sun Sep 28, 2003 8:32 pm

I could give you specs of my machine, XP AMD Althon 2400+, 512 DDR ram cant realy think of much else. Do you have messenger?

edit: I noticed the version on your website was created on the 26th September...not the 28th
_________________
[Blog] [Portfolio]

#11196 - Nessie - Sun Sep 28, 2003 9:02 pm

Hmm, that's odd. Ok, well...I've rebuilt it again and uploaded it...the new version should say 0.97.1.... if you download it and that's what you see, then maybe we could try messenger after that if you wouldn't mind? (assuming you still have the crash)

Cheers

#11198 - yaustar - Sun Sep 28, 2003 9:16 pm

Much better now, no more crashes (yet :p).

Still bewildered on the export of 512x512 maps, I send you my messenger address by pm
_________________
[Blog] [Portfolio]

#11199 - Nessie - Sun Sep 28, 2003 10:16 pm

Ok, I think I see what's happening.

In the engine I'm working with, we only use a 32x32 tile (256x256 pixels) hardware map....and that is dynamically built from the mapEd generated array which can be much larger. So, mapEd writes the data out with that in mind...just a huge rectangular array.

I don't know this for a fact, but I'm guessing in 64x64 tile (512x512 pixel) mode, which you are using, the map data has to be uploaded in 32x32 blocks or something like that? So, that's probably why you are seeing the goofy alignment.

#11201 - yaustar - Sun Sep 28, 2003 10:23 pm

edit: why is the map ed only giving me a quarter of the data during export, or do I have to export it one quarter at a time?
_________________
[Blog] [Portfolio]

#11203 - Nessie - Sun Sep 28, 2003 11:19 pm

Ok, I can't explain how some of the data in the map was corrupted, maybe it was generated with an older version of the map editor?? And it was only the blank tiles that were corrupted, which is why the map seemed to look ok.

So, basically I fixed it with flood filling in the blank areas with a valid tile...then refilled it back with an empty tile. Obviously not a good solution, but until I can get a better idea how the data got that way, fixing it would be difficult.

One thing I will do though is to put in a proper error message that the export didn't fully work.

Sorry for any confusion.

#11204 - yaustar - Sun Sep 28, 2003 11:39 pm

A tried your 'cleaned up' code, it's better but not yet right. I have just set up myself with Yahoo messenger. I post the pic over that.
_________________
[Blog] [Portfolio]

#11208 - Nessie - Mon Sep 29, 2003 1:10 am

Here's some rough (untested code) that might help you out:
Code:
#define REG_DMA3SAD    *(volatile u32*)0x40000D4      /* DMA3 Source Address */
#define REG_DMA3DAD    *(volatile u32*)0x40000D8      /* DMA3 Destination Address */
#define REG_DMA3CNT_L  *(volatile u16*)0x40000DC      /* DMA3 Control Low Value */
#define REG_DMA3CNT_H  *(volatile u16*)0x40000DE      /* DMA3 Control High Value */

// copy a 256x256 chunk...assumes map is 512 wide
u16 *CopyBlock( u16 *sourceData, u16 *destinationAddr )
{
   u16 *srcDataWork = sourceData;
   u16 *dstAddrWork = destinationAddr;

   u32 y;

   for ( y = 0; y < 32; y++ )
   {
      REG_DMA3SAD      = (u32)srcDataWork;
      REG_DMA3DAD      = (u32)dstAddrWork;
      REG_DMA3CNT_L   = (32>>1); //copy 32 tiles
      REG_DMA3CNT_H   = (0x8000 | 0x0400 & 0xcfff);
      srcDataWork += 64;   // map is 64 tiles wide...so this will step us down exactly 1 array line
      dstAddrWork += 32;   // but the dstAddr is 32 tiles wide..
   }

   // makes it a bit easier to chain the data blocks one right after the other
   return dstAddrWork;
}

// assumes a 512x512 map!!!
void UploadMap( u16 *map, u16 *mapDestination )
{
   u16 *work = CopyBlock( &map[0], mapDestination );
   work = CopyBlock( &map[32], work );
   work = CopyBlock( &map[32 * 64], work );
   CopyBlock( &map[32 * 64 + 32], work );
}


Naturally, you just throw your map array into the first argument of UploadMap, and tell it where you want to copy your blocks to.

#11209 - yaustar - Mon Sep 29, 2003 1:13 am

Thanks for the help you have given me. I really appreciate it.
_________________
[Blog] [Portfolio]

#11216 - Nessie - Mon Sep 29, 2003 5:20 am

I finished the UI changes and uploaded a new sub-version.

I'd be curious to know if people think the UI is better or worse.

And before anyone complains about the amount of screen space the MapView UI takes up, I'll just say that it is 100% the same size as the previous versions.

#11304 - yaustar - Thu Oct 02, 2003 12:05 am

Is it possible to draw 256 colour maps using your tool, if so would I have to use another tool to convert the tiles and palettes?

edit: grr, the map editor only exports the tiles that I use, the only way that I am going t oget a 256 colour map from this is either
a) put my tiles in sequence rather then in one corner and redo the map or
b) find a sprite/map converter which ignores non-unique tiles

crud
_________________
[Blog] [Portfolio]

#11316 - Nessie - Thu Oct 02, 2003 5:29 pm

Hmmm, most map editors I've tried actually didn't seem to optimize out the tiles (though I certainly haven't tried them all), they just spew out the tileset you load in. So unless I'm mistaken, you should have no problem finding a tool that will work like that?

Also, if you are suggesting mapEd running in multi- 16 colour palette mode...OR...256 colour mode....(but never both), sure, that's fairly easy to do.

But, if you are suggesting allowing a map to use one layer running in 16 colour mode and another layer in 256 colour mode, providing even a minimally robust export system to handle all of the things that could easily go wrong would be a nightmare.

So, as of right now, I'm pretty sure this is not something I will do (ever?) unless I have a serious need for it in the project that I'm working on or some game company (or individual) is willing to pay me gross sums of money to add such a feature, heh.

Cheers

#11317 - yaustar - Thu Oct 02, 2003 5:32 pm

I know I am going to sound like a complete beginner, but how do you change mapEd to export to 256 colour?
_________________
[Blog] [Portfolio]

#11318 - Nessie - Thu Oct 02, 2003 5:36 pm

As of now, there is no way to do it. So, it would be something I would have to code into the tool.

For starters, I probably wouldn't bother with optimizing palettes in that mode, which simplifies some things...that and I would have to change the tile data dump since each tile pixel takes up 1 byte instead of 1 nibble (4bits)....the tileset loader would need to load the tileset with colour 0 as transparent instead of treating every 16th colour as transparent....the map exporter wouldn't need to dump a palette index...and that's about it, I think.

Supporting one or the other isn't hard. Supporting a mixed mode in a useful way is not something I care to tackle unless I really have to, heh.


Last edited by Nessie on Thu Oct 02, 2003 5:40 pm; edited 1 time in total

#11319 - yaustar - Thu Oct 02, 2003 5:38 pm

is there a way to set the program (mapEd) not ignore dupicate tiles?
_________________
[Blog] [Portfolio]

#11320 - Nessie - Thu Oct 02, 2003 5:45 pm

Sorry, no way to do that right now either.

I suppose it wouldn't be hard to support an unoptimised mode...one where you can only load 1 tileset and that just gets spewed into a tile array...and the palettes get dumped with no optimization.

If that would be of use to you, I could do that over my lunch hour. No big deal, I just have other work to do during my regular work hours.

#11321 - yaustar - Thu Oct 02, 2003 5:48 pm

Heck, if you are busy dont worry about it too much about it. I can work on other stuff unitil you get some decent spare time (cant have you work on an empty stomach can we? :) )
_________________
[Blog] [Portfolio]

#11322 - Nessie - Thu Oct 02, 2003 5:52 pm

Hmm, if it were a problem, I probably wouldn't have offered, so it's not a big deal. And I work at home, so going hungry won't be an issue either, heh.

#11323 - yaustar - Thu Oct 02, 2003 5:55 pm

Ok then, if you can do that it be great! cheers
:))
_________________
[Blog] [Portfolio]

#11324 - Nessie - Thu Oct 02, 2003 6:17 pm

One thing I just thought of, if you are trying to get 256 colour support out of this, I don't think you'll have much luck unless you jump through some seriously nasty hoops.

Main reason, 256 colour tiles can only use every other tile index if I recall (or does that only apply to 256 colour sprites??). If this is true, the unoptimized mode I'm adding isn't going to fix the limitation.

#11326 - yaustar - Thu Oct 02, 2003 6:31 pm

thats true. :( *at complete lost now*.
In that case, i need to ask if I have two different tiles sets, will I get two seperate 16 colour palettes in the export. If I can, I use that to work round.
_________________
[Blog] [Portfolio]

#11328 - Nessie - Thu Oct 02, 2003 6:38 pm

Hmmm, all might not be lost? It would be ugly, but I guess you could just multiply (shift) the tile index in the exported map by two? As long as you didn't use more than 512 tiles, I guess it would work out after all?

I don't really have time to sift through the documentation to make sure I even know what I'm talking about, heh, so if someone else knows the answer, I wouldn't mind any relevant corrections.

#11332 - Nessie - Thu Oct 02, 2003 7:31 pm

For what it's worth, it's done and uploaded. Whether or not it will help you is another question, heh.

Basically, just select unoptmised mode when you create a new map. I didn't have time to make it so that an existing map could be converted to that mode.

The rules, well, you can only load one tileset...and you should make sure yourself that you don't load a texture larger than 256x256 or similar size combination that results in more than 1024 tiles.

#11339 - DekuTree64 - Thu Oct 02, 2003 9:26 pm

For what it's worth, I'm pretty sure it's only sprites where you have to specify even tile numbers for 256 color mode, you can still access 1024 256 color map tiles. Not sure why the hardware designers weren't consistent with it. My guess is that it takes a little more circuitry to multiply the number by 2 for maps, but since it takes 600 tiles for a full screen they figured it was important enough to do it, but you can access all of sprite mem at once anyway, so they might as well make the programmers deal with that.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku

#11511 - yaustar - Thu Oct 09, 2003 2:03 am

With collision layer, is the data exported left to right the next row or in a completely manner? I am assuming it would be the first due to it being the most logical but I need to make sure...:P
_________________
[Blog] [Portfolio]

#11518 - Nessie - Thu Oct 09, 2003 5:16 am

The data is exported, moving from the left...to the right...and from the top to the bottom. The data in the linear array could be accessed something like this:
Code:
u16 value = MyCollisionArray[y * CollisionLayerWidth + x];

...where x is a value from: 0 to (CollisionLayerWidth - 1)
...and where y is: 0 to (CollisionLayerHeight - 1)

#11536 - yaustar - Thu Oct 09, 2003 8:17 pm

Do you remember how you cleaned up my map when it was only exporting half the data as it is doing it again. :(
_________________
[Blog] [Portfolio]

#11539 - Nessie - Thu Oct 09, 2003 8:57 pm

Figuring out what causes that would be a lot better, but sure, send it along and I'll have a look at it again. gba_dev@yahoo.com

#11540 - yaustar - Thu Oct 09, 2003 9:05 pm

I sent it , cheers

I tried pretty everything you have suggested last time round such as resaving using 'save as' and flooding the empty areas with the transperent colours but still nada.
_________________
[Blog] [Portfolio]

#11542 - Nessie - Thu Oct 09, 2003 9:43 pm

One thing that I mentioned in the documentation is that removing tilesets is generally not supported....mostly because of a bad scenario that can happen if you remove every tileset. Not sure if this is what happened? No biggie.

The other thing is, flood filling works similar to some (most?) paint programs I've used...if you try to flood fill an area with the exact same colour, the flood fill operation does nothing? Same with mapEd...so, filling it with a different tile first is something you will probably have to do. From there you can flood fill it back to the desired tile. The thing to pay attention to is any area that doesn't get filled in even though you think it should....this happens because you can have duplicate tiles in your map at the edit stage...they look they same to you, but the editor doesn't really know they're the same at that point.

Something I'm thinking about, so hopefully I can come up with a good solution to fix this issue.