dynamical palette engine
Posted: Tue Jan 11, 2005 4:07 am
I think that one of the most peculiar aspects of Ultima VII original code (which is a supreme example of what I use to call "Programming ART") is the dynamical palette manager of the indexed VGA colours it had.
I think that Exult 256-colour palette is divided into four types:
1) System Colours: reserved for fonts (menus, dialog, books/scrolls, etc.), mouse pointers, menus, paperdolls, gumps and the like. They are altered by lighting only (day, night, sunrise/sunset, dungeons/lamps/torches, thunderstorms, etc.)
2) World Colours: used for textures in the game, portraits, items and character sprites. They are altered by lighting conditions only and are most of the 256 total colours (i guess they're much less thane one would think)
3) Magic Colours: used for magic-related items (potions, scrolls, items, etc.). Their palette is constantly changing AND is subject to lighting conditions, too.
There are several subsets of slots (e.g. 3 for "cyan" or "cold" magic, 3 for "green" magic, 5 for "red/orange/yellow" or "fire" magic, 3 for "purple" magic, and so on) whose RGB values cycle around, indipendendly, to create the magnificent look of magica auræ around objects or inside apparata. Pure genius!
4) Transparecy Colours: used for transparency effects such as shadows, glasses, invisible objects (chests, bags, caltrops, characters), ghosts, blood and other corporeal fluids (monster blood, puke, garbage, spider silk, etc.). Their palette continuously adapts to the requirements, and still change according to other transparent or magical objects, and to lighting conditions as well.
The wonderful thing is that you can still put a slained slug (with its transparent green blood) on a dead human's body (with its transparent red blood) under a glass window (transparent white), wait for a cloud (transparent black) to come over the scene... and still be able to discern some pavement's details !!!!!
I think that the adaptive algorithm which computes the number of "transparency layers" and reserves as many colours as needed to discern the objects is SIMPLY Astonishing.
My question: is my assumption correct? And what soruce file(s) is the Exult's palette manager coded into?
I think that Exult 256-colour palette is divided into four types:
1) System Colours: reserved for fonts (menus, dialog, books/scrolls, etc.), mouse pointers, menus, paperdolls, gumps and the like. They are altered by lighting only (day, night, sunrise/sunset, dungeons/lamps/torches, thunderstorms, etc.)
2) World Colours: used for textures in the game, portraits, items and character sprites. They are altered by lighting conditions only and are most of the 256 total colours (i guess they're much less thane one would think)
3) Magic Colours: used for magic-related items (potions, scrolls, items, etc.). Their palette is constantly changing AND is subject to lighting conditions, too.
There are several subsets of slots (e.g. 3 for "cyan" or "cold" magic, 3 for "green" magic, 5 for "red/orange/yellow" or "fire" magic, 3 for "purple" magic, and so on) whose RGB values cycle around, indipendendly, to create the magnificent look of magica auræ around objects or inside apparata. Pure genius!
4) Transparecy Colours: used for transparency effects such as shadows, glasses, invisible objects (chests, bags, caltrops, characters), ghosts, blood and other corporeal fluids (monster blood, puke, garbage, spider silk, etc.). Their palette continuously adapts to the requirements, and still change according to other transparent or magical objects, and to lighting conditions as well.
The wonderful thing is that you can still put a slained slug (with its transparent green blood) on a dead human's body (with its transparent red blood) under a glass window (transparent white), wait for a cloud (transparent black) to come over the scene... and still be able to discern some pavement's details !!!!!
I think that the adaptive algorithm which computes the number of "transparency layers" and reserves as many colours as needed to discern the objects is SIMPLY Astonishing.
My question: is my assumption correct? And what soruce file(s) is the Exult's palette manager coded into?