TilemapEd, Tilemap editor for the X16

Dacobi
Posts: 292
Joined: Sun Dec 19, 2021 1:44 am
Location: Samsø, Denmark
Contact:

Re: Tilemaped, Tilemap editor for the X16

Post by Dacobi »

Did you download version 0.6.19?
I had a pretty critical bug in the way removed tilemaps were deleted when a project was saved, prior to that.

The reason I chose to start the initial tile value at 1 was that the project info dialog starts tile numbers at 1 and if you're importing first a tileset and then an accompanying tilemap it's easier to get the tile number correct.
I don't think it works that well to list the number of tiles in the set and then have their indexes at one value lower, but I'll have to think about it.

I'll take a look at the initial palette offset tomorrow.

Regarding reordering of the tileset I'll have to look into that. This is my first project using Dear ImGui and I don't know how it handles drag and drop.
Johan Kårlin
Posts: 292
Joined: Wed Jun 03, 2020 11:33 am
Location: Kalmar, Sweden

Re: Tilemaped, Tilemap editor for the X16

Post by Johan Kårlin »

I didn't try to delete tilemap so I didn't notice the bug...

Regarding the numbering of tiles, you have the bigger picture and can see what is best.

Reordering tiles doesn't need to have a fancy solution, and swapping tiles as I mentioned, is not so clever when I think about it. My new suggestion is to add two buttons, one arrow up, and one arrow down. Then you move the selected tile in the tileset by pressing one of the buttons.
Dacobi
Posts: 292
Joined: Sun Dec 19, 2021 1:44 am
Location: Samsø, Denmark
Contact:

Re: Tilemaped, Tilemap editor for the X16

Post by Dacobi »

I just uploaded a version with palette offset in create/import tilemap and drag and drop swap/replace and move up/down buttons, in the tileset.

Normal drag and drop will just swap the tiles, but when holding down LCTRL the target tile will be replaced with a copy of the source.
I find that drag and drop works better than the up/down buttons. The tile indexes quickly change to much for the function to be use full, but if you haven't made much of the tilemap(s) yet its a fast way to reorder the tileset.

The replace tile function has an undo action but the swap functions don't. don't know if that makes sense.

It is a breeze working with Dear ImGui. Originally I build the GUI entirely from scratch using just SDL, but a friend of mine kept telling me to checkout Dear ImGui. At the time I thought it would require me to setup an OpenGL renderer, but eventually I gave it at look and saw it supported the SDL renderer.
Is so much easier and nicer to work with than trying to build a GUI from scratch.
Johan Kårlin
Posts: 292
Joined: Wed Jun 03, 2020 11:33 am
Location: Kalmar, Sweden

Re: Tilemaped, Tilemap editor for the X16

Post by Johan Kårlin »

I am not familiar with Dear ImGui or SDL but I am glad that it works so well! I know C# and .NET and 6502 assembler that is just about all.

I tried the latest version and it seems to work well bit both drag and drop and the buttons. But the functionality is not actually what I was thinking of. What I am after is the possibility to change the order of the tiles in the tileset but still keep all tiles at the same place in the tilemap. So when you reorder tiles, nothing visibly is happening with the tilemap. When creating tiles and maps I have found myself starting with a small tileset. I start with some simple maps. Then I am improving them gradually, adding more tiles, more details. Maybe I start with four tiles for a house, four tiles for a tree and eight tiles for a road with bends. Later on I add tiles for another house, a bush, road crossings and so on. This creates the need for reordering because I want to keep tiles of the same category together. It can be quite messy otherwise.
Dacobi
Posts: 292
Joined: Sun Dec 19, 2021 1:44 am
Location: Samsø, Denmark
Contact:

Re: Tilemaped, Tilemap editor for the X16

Post by Dacobi »

What I am after is the possibility to change the order of the tiles in the tileset but still keep all tiles at the same place in the tilemap
This is a very different problem. The way it works with the project files being just the VERA data, for this to work I have to change all affected tile values in all open tilemaps. That's the only way to move a tile and not have the tilemaps change.
But I could make it a config option in the menu to select which functionality is active.

Right now I'm working on a tile selection editor which is also a bit complicated. I can probably get it to work with palette offsets, but I don't think I'll get it to work on selections that contains flipped tiles. All my pixel edit code is setup to work on tiles without them being flipped.
Dacobi
Posts: 292
Joined: Sun Dec 19, 2021 1:44 am
Location: Samsø, Denmark
Contact:

Re: Tilemaped, Tilemap editor for the X16

Post by Dacobi »

I just uploaded er version with a menu option Tile Reorder->Update TileMap(s)

The default is to update the tilemaps and it's quite snappy considering that almost every tilemap value is rewritten every time a tile is moved :)
Dacobi
Posts: 292
Joined: Sun Dec 19, 2021 1:44 am
Location: Samsø, Denmark
Contact:

Re: TilemapEd, Tilemap editor for the X16

Post by Dacobi »

I just uploaded a release candidate of TilemapED.
The selection editor is there and works. Sort of when BPP is lower than 8. Turns out Tile Flip was the easy part :)
I'm now making backup files when ever a Tilemap is removed and the project is saved.
Johan Kårlin
Posts: 292
Joined: Wed Jun 03, 2020 11:33 am
Location: Kalmar, Sweden

Re: TilemapEd, Tilemap editor for the X16

Post by Johan Kårlin »

You continue to develop this impressingly fast : ). Good idea to add updating tilemaps as an option when reordering tiles. It works just fine.

If I understand you right it is now possible to make a selection of tiles and edit them together. But how? Not by using the mouse? I see that I can edit the whole tileset together but that is another feature?

Great with keyboards shortcuts and that you can see what they are in the menus. A few thought regarding this. They are all good but maybe the delete button could be a shortcut for removing a tile. Maybe ctrz-Z could work for undo beside "U". And maybe X could be flipping a tile horizontally and Y flipping vertically as an alternative to using F. As usual, just some thoughts.
Dacobi
Posts: 292
Joined: Sun Dec 19, 2021 1:44 am
Location: Samsø, Denmark
Contact:

Re: TilemapEd, Tilemap editor for the X16

Post by Dacobi »

The Selection Editor is complete in RC3. To use the Selection Editor you have to make a normal mouse selection in a tilemap, but one that is only a rectangle of max 16x16 tiles. Then you choose Selection in the View menu.
If the selection is larger than 16x16 or contains elements outside of a rectangle you'll get an error message when trying to enter Selection Editor.

I'll add your keyboard shortcuts ideas in the next upload. The only thing I'm not sure about right now is wether Ctrl + Z will conflict with anything, but I wouldn't think so. I'm only using Ctrl for moving areas that are larger than the window and to replace tiles with drag and drop.

(edit) I've uploaded a new version of RC3 that has the keyboard shortcuts you've mentioned. I've also added a GUI option under (TileSet Reordering->Warn before Tile removal) so you can disable the warning dialog, when pressing (DEL) to remove an unused Tile.

Forresten, er du fra Sverige eller Norge?
Jeg er fra Danmark : )
Johan Kårlin
Posts: 292
Joined: Wed Jun 03, 2020 11:33 am
Location: Kalmar, Sweden

Re: TilemapEd, Tilemap editor for the X16

Post by Johan Kårlin »

I get it now. I didn't realize or had forgot that I press shift for making a selection with the mouse. Editing a selection of tiles work great, especially when you can choose to have both tilegrid and pixelgrid. The Selection Editor and the Tileset work both so well that I wonder if you really need the Tile Editor? I think I prefer to work with the Tileset Editor even when working with single tiles.

Jag bor i Kalmar i Sverige. Kul att vi är några från de nordiska länderna som är engagerade i detta. One day we will have a North Europe X16 convent.
Post Reply