iProgramInCpp's Bunker

HomeYouTubeGitHubDiscord [Gamma64]BlueskyRamblings


How does CelesteNES manage palettes? (DPLS)

In this article I want to explain what I do to manage palettes within CelesteNES. Note that only sprite palettes are managed by DPLS, not background palettes. Those might be managed separately with a manual setting or something.

The problem

The situation was once quite simple. There were four palettes loaded in at once:

Obviously some sprites do not fit into these palettes. Examples include elevators (gray), keys (gold), and Granny (white, beige, and green). Not to mention, dialogs come with their own problems which this also aims to solve.

Introducing DPLS

DPLS, a/k/a Dipples, a/k/a Dynamic Palette Loading System, is the palette manager within CelesteNES. As the name suggests, it manages sprite palettes dynamically. Here's how it works:

The first screenshot with properly rendered keys: (they used to be green before I wrote this!) Madeline dashing somewhere with a key to the right, rendered golden

Conclusion

I know this article is shorter than the last one. There wasn't too much to explain, really. DPLS is a simple, yet versatile, system, that allows me to put entities with 2 types of palettes with no problems.

It also allows me to make Madeline's hair pink in The Summit which I might do at some point after the first demo comes out. Hopefully.


This article was last modified on Thursday, November 28, 2024, at 23:18:55. Back to index