Primary tabs

Comments by User

Saturday, June 27, 2020 - 17:44

@Sharm:
No, those are too many colors.
Transparent is counted as a color, so it's using 5 colors.
But my demake of tiny16 explicitly targets cgb/dmg: https://opengameart.org/content/tinygb-characters
I haven't tested the newly added animations though. Couldn't get myself to implement character animation into my game yet. But the basic walking animation is unchanged.
I used black shadows on humanoid for cgb compatibility, since white is transparent, light grey is skin color and dark grey is clothing/hair color.
All characters in my game are from or based on tiny16, but the tileset is zoria.

@withthelove:
Sounds like a good workflow.
I think you'll need automatic color translation mostly for getting to your final palette translation, which then can be automatically applied.

Saturday, June 27, 2020 - 13:52

I think batch processing is especially useful with stuff from open game art.
If you take assets and manually adapt them and the original submission gets updated, you'll have no benefit from that.
If you do it automated, you can just replace it with the updated version.
Switching to an extended version only works if it keeps the original format. Unless you also automatically change the tile format.

For characters the base and clothings should be seperated like in many LPC submissions, though. If that's not the case it won't work nicely, like it's the case with tiny16 since skin and hair share colors.
The naked guy would work, though. You should be easily able to switch from a dark skinned https://opengameart.org/content/tiny-16-basic to https://opengameart.org/content/tiny-16-expanded-character-sprites or https://opengameart.org/content/tiny-16-more-character-animations

Saturday, June 27, 2020 - 10:39

Tip for treating parts of the spritesheet differently:
I sometimes add new (duplicate) colors to the palette, then lock all colors in mtPaint but the one I want to replace, select an area and fill it with the new color. The image itself does not change, since I change only changed the used index, but not the associated color.
You can do that too. You could allow to select an area and then show all colors used in that area and allow the user to split off one of the colors. With that you would have duplicate colors in virtual palette, but the colors could have a different context.

And regaring CLI version:
Maybe you wanna take a look at my fork of https://github.com/basxto/Universal-Spritesheet-Character-Generator
It allows to change the palettes (hardcoded palettes for skin, clothes, metals etc.) both in the browser and in the terminal (node.js)

Thursday, June 25, 2020 - 16:03

I think so.
When I parse them I just skip to after the # line and parse the colors with regex '^\s*(\d{1,3})\s+(\d{1,3})\s+(\d{1,3}).*$'

mtPaint generates them like this:
GIMP Palette
Name: gb
Columns: 16
#
15 56 15 Untitled
48 98 48 Untitled
139 172 15 Untitled
155 188 15 Untitled

EDIT:
I don't even skip to #, I just use the regex. But I think I did the skipping in an older shell script.

Thursday, June 25, 2020 - 11:29

@withthelove:
You are right, there are different use cases.
I wrote a little tool for changing the palette in an indexed PNG a couple of months ago, since there was no software to be found that was capable of doing that.
-> https://github.com/basxto/loadgpl
Duplicate colors are supported. I sometimes use "subpalettes" in PNGs for different parts of the image, so I can shift them independently.
This tool is obviously not meant for switching to a completly different color palette, but to recolor something within the same palette.
This is nice if you want to create color variations, but also propagate pixel changes you make to the original.

I think one has to distinguish between palettes (DB16) which define all colors that could be used and palettes defined in an image (indexed PNG/BMP), which uses colors from the former, but can have duplicates to easy the automatic generation of color variations.

Wednesday, June 24, 2020 - 22:11

That feedback was meant for William.Thompsonj, I edited that apparently too late.
I overread your post at first and noticed later that my response could be misunderstood as being addressed at you.

The downloading problem and sorting does not apply to yours. But the magic knob issue does.

Even though those ideas could be implemented in yours too, indeed.

> Do you have any suggestions for palettes that I should add to the library?
Zoria (not on lowspec) https://opengameart.org/content/zoria-tileset
And maybe the original palette of LPC (neither on lowspec) https://lpc.opengameart.org/static/lpc-style-guide/styleguide.html

> I'm not sure what you mean by palettes with duplicate colors
In a paletted image each pixel stores the palette index instead of the color. And the palette then is made up of colors, there can be duplicate colors at different indices.
You might not be able to access palettes with JavaScript, at least I wasn't the last time, I tried.

I attached a little bit forced example. It uses a palette of 5 colors. Color #1 and #2 are both black, but #1 is the outline and #2 is the hair color. You can change hair color and outline color independently by changing the color value of those indices.

EDIT:
Added screenshot for palettes

Wednesday, June 24, 2020 - 20:51

@williamthompsonj:
Drawbacks: (as far as I can see)
- can't be used in automated work flow with Makefiles etc.
- can't handle palettes with duplicate colors
- automatically sorted palette might be undesirable in certain situations

Feature ideas:
- loading palettes from lowspec
- importing/exporting .gpl (simple text file)

I wasn't able to check whether the swapped image is a paletted png, since the download does not work for me. It's just called `no_image_loaded`

EDIT:
Just remembered this little tool: https://github.com/PureAsbestos/Image-palettizer

EDIT2:
@laborious-rex:
Magic knob does not appear to work on firefox, it just makes the palettes shake.

Monday, May 25, 2020 - 23:47

If it would not touch the image, the pixel's colors would change.

Monday, May 25, 2020 - 16:17

Well, changing the palette is not enough, you also have to adapt the indices of the pixels.
mtPaint is capable of changing the order, when you press shift and drag a color in the palette.
Grafx2 allows to swap two colors in the palette with or without also changing the pixels.

Wednesday, May 6, 2020 - 00:48

I'd say structs are more type-save. But unions are quite handy when you have different versions of savegame formats (backward compatibilty) and just extend the previous version a bit.

Pages