TilemapEd, Tilemap editor for the X16

Post Reply
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'm glad you're happy with the program.
I'm using 24 bit colors because that was the only way I could think of when working with SDL. The colors are however mapped to the closest X16 value when changed in the palette editor.
I just haven't figured out a way to have the value update instantly, but if you change a color value and then switch to another color and back again you will often see that the value you've changed has changed slightly from what it was before you switched colors.

I haven't had much time to work on TilemapEd lately, but when I get around to it I'll try to find a way to have the color values update instantly.

(Edit) I could probably change the Sliders to use the 12bit values, but I'm not sure it can be done for the Color picker. So I still think the best solution is to map the values, instead of having different value types in the Sliders and Picker.
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 »

Ok, I didn't realize that the colors were mapped to X16 colors after being set. That's good, then it is not that important that the dialog works with 24 bit values.
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 »

Ok, I didn't realize that the colors were mapped to X16 colors after being set. That's good, then it is not that important that the dialog works with 24 bit values.
I've been thinking about it and would like to hear your thoughts about having the Sliders as 12bits but the Picker still being 24bits?

The reason is that changing the Sliders would be relatively easy™ but the Picker would require me to rewrite a Picker widget from scratch.

I thought that maybe it would be OK for them to be different due to their different functionality.
Then again it may just create more confusion.
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 think that’s a good idea. It doesn’t matter that much if the picker is 24 bit, probably not worth the effort to rewrite it. If the slider is 12 bit it is not sure users will even realize the picker is different and it will always result in 12 bit values in the end. A 12 bit picker is very valuable I have realized when I just had a X16 palette and imported it to TilemapEd manually by entering the values. I had to convert them to 24 bit values, enter them and then the program converted them back.
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 »

A 12 bit picker is very valuable I have realized when I just had a X16 palette and imported it to TilemapEd manually by entering the values. I had to convert them to 24 bit values, enter them and then the program converted them back
There is another solution I've considered, which is to still have the Slider range as a 4bit value, but instead of listing an int between 0-15 it would list the mapped 8bit value.
When CTRL clicking the Slider to enter text field mode it would still be a 4bit value that should be entered and when dragging the Slider it would change to the next mapped 8bit value.
I could then add a small text to the top of the palette editor stating that values are mapped automatically.

But I'm not sure if this would cause more or less confusion?

(Edit) Again the reason would be consistency. The default ColorPicker has the color value as both 24bit RGB and HSV and I'm not sure if they can be removed without a rewrite.
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 »

It could work, but maybe the best would be if the slider would have 16 positions which all stated both the 8-bit value and the corresponding 4-bit value? So f I have a certain palette with all values in 4 bits, I can easily enter them with help of the slider, and if I have the values in 8 bits it will just as easy.
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 »

It could work, but maybe the best would be if the slider would have 16 positions which all stated both the 8-bit value and the corresponding 4-bit value? So f I have a certain palette with all values in 4 bits, I can easily enter them with help of the slider, and if I have the values in 8 bits it will just as easy.
This sounds like the solution and it wouldn't require any more code than what I was already planning since the 8bit values would be Strings.

I'm thinking a format like 0/0, 1/16, etc
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 »

That is good. But I think it would be 0/0, 1/17, 2/34, … 15/255. If you go for 0/0, 1/16 … it will end with 15/240 instead of 15/255. Or am I getting this wrong?
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 »

That is good. But I think it would be 0/0, 1/17, 2/34, … 15/255. If you go for 0/0, 1/16 … it will end with 15/240 instead of 15/255. Or am I getting this wrong?
You are correct, and the code I'm using already ends up with 1/17, .. ,15/255. What I wrote before was just off the top of my head.
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'm almost ready with an initial version of the new palette editor.
For some reason I couldn't get CTRL click to work, so for now I've disabled it.
Screenshot from 2023-05-05 13-53-07.png
Screenshot from 2023-05-05 13-53-07.png (83.35 KiB) Viewed 278701 times
Post Reply