First time visiting the jcsref website? Check out the welcome page for information.

Browse through the latest news to see what's going on with JCS and level editing in general.

Take a look at this month's feature articles for some of our best content.

Been a while since your last visit? Find out what's new in the latest updates section.

What have people been talking about on the site? Find out in the latest comments section.

Get to know the staff members of jcsref and find out how to contact us.

Our links section is full of great JCS resources. If you can't find it here, you'll find it on one of the links.

Not really sure what you're looking for? Want to see what all jcsref has to offer? Check out our topics listing now! You can use the link above, the book icon up top, or the topics tab to the left.

Do you know exactly what you're looking for? Are you trying to get information on several topics? Give our archive search a try! Use the link above, the magnifying glass icon up top, or the search tab on the left.

Not sure on the spelling of your topic? Need to browse through some keywords to find what you want? Our site index is just what you're looking for! To go there now, use the link above, the papers icon up top, or the index tab to the left.
 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 22:41. Made by Violet CLM.