12-23-2020, 09:03 AM
Pages: 1 2
12-24-2020, 06:45 AM
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?
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?
12-24-2020, 06:55 AM
I think consoles likes the NES and SNES can have an attributed palette per tile
12-24-2020, 07:01 AM
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.
12-24-2020, 07:10 AM
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
And I can virtually split the palette by code. I have to try that by myself
12-24-2020, 04:52 PM
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.
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.
12-25-2020, 06:06 AM
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!
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!
12-25-2020, 07:42 AM
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
12-25-2020, 09:18 AM
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?
Can a tilemap use multiple tilesets? If yes, is there one palette by tileset or one palette for the entire tilemap?
12-27-2020, 05:08 PM
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.
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.
Pages: 1 2