AGS Support > Advanced Technical Forum

Issues with 8bit palettes

(1/5) > >>

doimus:
Hi,

I was experimenting with 8bit 256 color graphics as of lately and have run into a few issues.

First, palette importing. When importing from bmp file it all goes well, but when importing from a pal file, the palette rgb values have some weird offsets, appearing much higher than 255, and throwing an error in AGS.
I'm using ProMotion app for palette export, it may be that the problem is on its end.


Next is the palette cycling. I admit I've never used it in AGS before, but this kind of behavior is really odd... For example, when using CyclePalette(0,15) function, I understand the palette indices from 0 to 15 should *all* shift one color value every tick, right?
In my case, only the index 0 shifts until it reaches 16 then wraps. Indices 1-15 remain static.
Example:

If I use anything but 0 as function parameter, ie. CyclePalette(1,255), nothing happens. ???
I'm on AGS 3.4.2 alpha1, but I remember similar thing happening few versions ago too. Tested so far on two machines, one desktop with nvidia gpu and one Intel Atom tablet. Both running Win10.

And finally, since 256-color graphics are only supported in software rendering mode, does it make sense to use it at all? I vaguely remember reading about people having issues with software renderer, and not having a fallback option doesn't seem like a great idea. In any case, 8bit graphics is only relevant for palette manipulation, everything else works the same in 32bit mode anyway. But palette manipulation IS a great feature to have. :-D

------

EDIT/SOLVED: If you're one of those forum searching people from the future (Hi people from the future! Did you come here in a flying car?) the full explanation is in the post #16.

Gilbert:
I'm not sure whether this is the problem, but colours with lower indices (at least #0-15) are supposed to be "reserved", so you may not be able to do whatever you want to them. For dynamic palette entries, it's advised to have them taking higher indices(which also in general is better for organisation, so you can have all the fixed colours taking the lower indiced slots).

Also check that you're not using the Direct3D or OpenGL drivers in the game's set-up, as last time I tried they didn;t even support 8-bit modes.

There are some information in the wiki, though they're written some time ago I think they're still mostly relevant. (There're some problems displaying images in the wiki ATM and I'll report this.)

Crimson Wizard:
Best person to ask about 8-bit games is Scavenger, he makes only them afaik :).


--- Quote from: doimus on 10 Apr 2018, 14:55 ---And finally, since 256-color graphics are only supported in software rendering mode, does it make sense to use it at all? I vaguely remember reading about people having issues with software renderer, and not having a fallback option doesn't seem like a great idea. In any case, 8bit graphics is only relevant for palette manipulation, everything else works the same in 32bit mode anyway. But palette manipulation IS a great feature to have. :-D

--- End quote ---

Neither Direct3D nor OpenGL support paletted mode natively (because both are working with textures rather than bitmaps). The solution that was once suggested is to create a mixed mode where the in-game gfx manipulation would be performed in 8-bit software mode, but the final output made through one of the "advanced" renderers (converting final 8-bit room image on fly). However, no one has got to make such mode yet.

Since AGS 3.4.1 both hardware renderers actually run 8-bit games, converting all sprites to 32-bit, but support is only formal, because some graphic aspects may be lost and dynamic palette cycling does not work either.

Gilbert:

--- Quote from: Crimson Wizard on 10 Apr 2018, 15:53 ---Best person to ask about 8-bit games is Scavenger, he makes only them afaik :).

--- End quote ---
Me also, apparently, and that's why I wrote those wiki pages.

Crimson Wizard:

--- Quote from: Gilbert on 10 Apr 2018, 16:02 ---
--- Quote from: Crimson Wizard on 10 Apr 2018, 15:53 ---Best person to ask about 8-bit games is Scavenger, he makes only them afaik :).

--- End quote ---
Me also, apparently, and that's why I wrote those wiki pages.

--- End quote ---

Oops! :tongue:

Navigation

[0] Message Index

[#] Next page

Go to full version