You can support the development on the Github Sponsors page.


Tech > LIGHT


showing 32 colors possibilities and light calculation
made by rigachupe
uploaded by Rigachupe
added:
updated:
download cartridge
- CLICK TO PLAY -

13


Showcase of using 32 color all at once! In this case i use OVR screen and palette to simulate a flashlight circle that makes what has been drawn lighter.

Feel free to use this in your project to simulate lights, shadows, transparent water etc. This way you can draw a simulated 32 color indexed picture on screen. Split the 32 colors into 2 palettes. Then in first step you draw every pixels that belongs to palette for SCN. And in OVR function you draw the rest of 16 palette pixels. Together they form 32 color picture.

Added two modes of lighting. The first one uses OVR screen and palette to map pixels and lightsources. The second one (toggle with Z key) uses precalculated shadow palette with 4 intensity levels of light positioned as a 20pixel radius circle at mouse cursor. The shadow palette is defined in sprite number 64, see for yourself how it looks.

Comments


masternama

Cool!

Rigachupe

It is not yet optimized for real use. For those who like to read how such techniques work i have a link : https://hackernoon.com/pico-8-lighting-part-1-thin-dark-line-8ea15d21fed7




Post comment