16 bit to 8 bit
3D Tileset Objects
Ambient sounds (Howto JCS)
Background Music
Bouncy things
Buttstomp Scenery
Compiling a tileset
Cool layer tricks
Creating the Palette
Destruct Scenery
Detached Starfields
Event Theory
Events moved by belts
Important phrases (Howto JCS)
JCS Hotkeys
Layers (Howto JCS)
Links and Resources
Making a simple level (Howto JCS)
Masking in general
MCE's - why and how
Motion Blur
Mystery of the Pacman Ghost
Palette Swap Animations
Remembering Triggers
Textured Backgrounds
Tile Cache
Trigger Scenery in background layers
Underwater Ambient Lighting
Welcome to JCSref

 Viewing node Underwater Ambient Lighting

Underwater Ambient Lighting

This article is only for 8-bit color. Nothing that is described works in 16-bit color, due to the incompleteness of the color mode. As a general rule, if you're at all interested in palettes, don't use 16-bit color. This article also does not apply to OEM versions.

There is a common belief that you can't use both ambient lighting and water in the same level. This is not true. It is true that the level outside of the water cannot be affected by lighting, but underwater is a different matter. Changing the ambient lighting used by the level will change the palette entries (colors) used by the water, which is created by a number of horizontal lines stretching across the screen.
Another common belief states that for working water, you should use a (usually blue) gradient from palette entry 176 to palette entry 207. This is also not true. The minimum number of palette entries needed for fully working water (in a level with no ambient lighting at all) is 176-224.
Play Marinated Rabbit in 8-bit. Notice that the water gets progressively darker as you get farther into the level. This is because the range of palette entries used by the water is slowly shifting down:

That's the Beach2 palette. That's why it has such a range, while if you were to darken the lighting in most water tilesets everything would go completely haywire.
So, here are the important values.
Palette entries for ordinary water: 176-224
Palette entries for water which can go down to 0 intensity: 176-240.
Palette entries for water which can have any lighting whatsoever: 165-240
Example files

Added on: 23 February 2005 23:41. Made by Violet CLM.