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 »

I just uploaded version 1.8.13, which has a new dialog for importing a sub range of Palette Colors from GIMP and Project Palettes along with some bugfixes.

One bugfix was that Message/Error dialogs were not shown after dialog actions in the last upload.

Also the GIMP Palette import code didn't correctly convert the 24bit colors to 12bit.
After the bugfix some imported colors (especially grayscale) may appear tinted compared to the original color and need manual editing. However the conversion is more accurate now.

Edit: Just uploaded version 1.8.16, with even more bugfixes in GIMP Palette import and again a more accurate (I think) conversion of 8bit RGB values to 4bit.

The current formula is:

Code: Select all

(int) std::round( float(8bitRGBValue)/17.0 )
Where the 4bit values are then mapped to the following 8bit values for use within the Editor

Code: Select all

{ {0, 0}, {1, 17}, {2, 34}, {3, 51}, {4, 68}, {5, 85}, {6, 102}, {7, 119}, {8, 136}, {9, 153}, {10, 170}, {11, 187}, {12, 204}, {13, 221}, {14, 238}, {15, 255} }
Also there was a bug in the Palette Editor, where the 2nd color was always set to black.
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 version 1.8.29 with some more Palette Editor tweaking including a dialog for exporting the current Editor Palette as a GIMP or Project palette file and a function to load the default X16 palette.
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 »

Version 1.8.34 is now on GitHub with some tweaks.

The Palette Export dialog now has an option to select a sub range of Palette Colors to export.

Pressing <ENTER> will no longer "Confirm" an active dialog when a dialog widget has active text input (ie. when <CTRL> clicking Int Sliders or entering text in a File Path widget)
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 »

Version 1.8.37 is now on GitHub. Pressing <ESC> will no longer "Cancel" a dialog when a dialog widget has active text input.
FearLabs
Posts: 5
Joined: Fri Aug 20, 2021 7:02 am

Re: TilemapEd, Tilemap editor for the X16

Post by FearLabs »

Thanks Dacobi, I am having a lot of fun with this!

I have a simple(hopefully) feature request: In TileMap mode, when you press a key (TAB maybe?), instead of drawing the tiles it draws squares with the CollisionMap numbers in the middle. This could be checkmark toggle in the CollisionMap menus as well.

Other thoughts:
- maybe 0's are just not drawn, to simplify how it looks.
- this could be some sort of overlay if you want to get fancy.

This way you can quickly see the CollisonMap as it applies to your map.
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 »

Hello FearLabs, I'm glad you like the program

It should be doable to create an overlay of Collision Values on top of the Tilemap although in some situations where the Tilemap scale is too small it will probably not be possible to show the overlay.

Lately I've been thinking about upgrading the Collision Map class so they can be created with different formats.
The formats I had in mind are: 8bits, 4bits, Flip + 6bits, Flip + 2bits, Palette Offset + 4bits, Flip + Palette Offset + 2bits

When I get around to working on the Collision Map I'll look into overlays as well.
FearLabs
Posts: 5
Joined: Fri Aug 20, 2021 7:02 am

Re: TilemapEd, Tilemap editor for the X16

Post by FearLabs »

Sounds great, looking forward to it! It will really be helpful for making levels that have a high level of interactivity.
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 »

Hi, I am back again working with TilemapEd, I haven't done anything during the summer. For the first time, I am drawing tiles that I intend to use in my finished game. This means I am not just drawing a few tiles for testing purposes. One thing that I immediately realized is that it would be very useful to show the tiles' index numbers, both when looking at the tilesets themselves and the tilemaps.

If you look at the screenshot I have attached, it is not apparent how the tiles are meant to fit together. Therefore I have a small text file where I am trying to note this by building a small tilemap consisting of index numbers. But when doing this I have to count manually to see that it is number 4 that is meant to be above number 11 and then write that down. If I rearrange the tiles I have to start over and update everything I have written.

When using PyxelEdit, I could build an example tilemap just to clarify how bigger structures were built up. I could choose to display all tile numbers above each tile on the map to easily see how they fit together. Because of that, I didn't have to write any information down.
tiles.png
tiles.png (99.54 KiB) Viewed 130058 times
Oh, one more thing, when zooming in tiles, I don't get any scrollbars. This means that I am just able to see about the first 25-30 tiles when zooming in.
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 »

Hello Johan

I've been so busy with my game I didn't see your post here : )

Regarding Tile numbers I've already been thinking about ways to create Text Overlays for showing the "Collision Values" in a TileMap, a suggestion from FearLabs. I guess the same code could be used for TileSets to show Tile numbers.

I'm not sure what you mean by scrollbars? If it's the TileSet editor you mean, the way it works is that you hold down "Left CTRL" and then drag the TileSet with "Left Mouse Button".
The reason for this is that the tiles in TileSet editor are rendered using pure SDL, so there's no way to add scrollbars (Unless I make my own SDL Scrollbar widget, which will probably not happen any time soon : ) )
Last edited by Dacobi on Mon Aug 28, 2023 6:29 pm, edited 3 times in total.
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 TilemapEd version 1.8.92 to GitHub.

The primary change is that CollisionMaps now can be created with the following formats:
8 bits, 4 bits, Flip + 6 bits, Flip + 2 bits, Palette Offset + 4 bits, Flip + Palette Offset + 2 bits

I've only done extensive testing for 8/4 bits and Flip + 6/2 bits, but not for Palette Offset.

If anyone has existing "colmap.dat" files they have to be updated manually by adding a "0" to the end of the first line.

Code: Select all

CollisionMap <values> 0
I'm also working on a feature for importing with/applying a "Color Offset" for TileSets, Sprites, Tiles and Sprite Frames.
Currently it's only available for importing a TileSet, either in an existing project or when creating a project, but it will be available later for importing Sprites and for the existing TileSet, Tiles, Sprites and Sprite Frames.
Post Reply