Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple palettes for a tileset?
#1
Hi! I know I can probably change the palette of a tileset

But can I choose a specified palette to use for a specified tile?
Reply
#2
Hi!

You can't change the palette of a single tile. Palette is a per-layer (or per-tileset) attribute. All tiles in a tileset share the same palette. What's your intended use case?
Reply
#3
I think consoles likes the NES and SNES can have an attributed palette per tile
Reply
#4
Yes, but the number of different palettes were fixed in hardware, and were 16 colours each (4bpp). In Tilengine you can have an unlimited number of palettes, 256 colors each one. This makes per-tile palette unnecesary. It's very unlikely that you will need more than 256 colors on a pixel-art tileset, that are usually drawn using very small palettes.
Reply
#5
Ah I see, I maybe have a small workaround by dividing the main palette with multiple subpalettes and color my tiles with the correct set of colors
And I can virtually split the palette by code. I have to try that by myself
Reply
#6
Don't try to auto-impose such limitations. The max 16-color per sprite or per-tile was a hardware limitation due to memory constraints. Any developer of that era would have welcome an unified 256 colours per layer/sprite instead of those chunked modes, they had to work hard and do a lot of planning to make nice graphics. You can put much more color onscreen with Tilengine than they could do with their hardware. And as I said, pixel art graphics uses small, hand-picked palettes:
https://lospec.com/palette-list

Same happens with scrolling too. In real hardware, the viewport RAM was just a bit bigger that the screen size, so they had to stream tile data from the ROM in sync  were the full map was stored. Try for example the Sega Genesis/Megadrive emulator Gens Plus! that has debugging windows, and see what happens to the video RAM in realtime as you scroll in the game. By contrast, in Tilengine you have the whole map loaded, so with just a pair of coordinates you can get anywhere. That was a dream back then.
Reply
#7
I already saw the scrolling thing with a NES and SNES emulutor. That's interesting the entire tilemap wasn't loaded at once!

For the palettes, an exemple is the GameBoy advance that has a 256-colors palette for layers and a 256-colors palette for sprites, so 512 colors in total!
Reply
#8
Yes, that was a GBA-specific feature. It supported classic 4bpp (16 colors) per tile, 16 palettes of 16 colors each, or direct 8bpp (256 colors) with a single global palette. The GBA was an advanced machine in this regard! Tilengine uses this 256 colors per sprite or layer. Using transparency -blending- effects, the number of final colors increases. The SNES had some basic but effective transparency effects, Tilengine uses the same method bun expands it with more predefined modes and a custom one
Reply
#9
I saw that, sounds interesting

Can a tilemap use multiple tilesets? If yes, is there one palette by tileset or one palette for the entire tilemap?
Reply
#10
Hi,
Tilengine accepts only one tileset per layer. In Tiled you can set tiles from multiple tilesets in a single layer, but Tilengine won't handle it. So make sure that all tiles needed on a tilemap belong to a single tileset.

The opposite is allowed: you can have multiple layers with different tilemaps using the same tileset. But just a single tileset per layer/tilemap.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)