Brightness settings vs lighting effects dilemma

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
Only One In All
Metal Slime
Posts: 356
Joined: Tue Oct 16, 2007 5:56 am
Contact:

Brightness settings vs lighting effects dilemma

Post by Only One In All »

This was originally posted at CP in the Plotscripting thread, but I never really got my question answered.

In order to do lighting effects, I have NPCs that alter the dark, but it first resets the palette with 'reset palette' and then it does the tweak palette command. My brightness settings feature changes the master palette with 'load palette', but when comes the NPCs that alter the brightness with its 'reset palette' command, it automatically reverts back to the default master palette.

Is there any way around this?
User avatar
camdog
Gameathon 2009 Winner
Posts: 194
Joined: Sun Oct 21, 2007 12:04 am

Post by camdog »

Maybe I'm misunderstanding your problem, but... Why not just tweak the palette without resetting it?
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Don't use "reset palette" at all. Use <a href="http://hamsterrepublic.com/ohrrpgce/doc ... ette">load palette</a> instead.
User avatar
Only One In All
Metal Slime
Posts: 356
Joined: Tue Oct 16, 2007 5:56 am
Contact:

Post by Only One In All »

camdog wrote:Maybe I'm misunderstanding your problem, but... Why not just tweak the palette without resetting it?
The problem with tweak palette is if you make all colors -1 and then +1, even though you're back to the same colors the colors are.. different. So since this is a constant continuous effect in my game, the colors will eventually end up being all blended in together. I'm not sure how to exactly explain it, but you can try it yourself. Have one tile do -1 for all colors, and +1 for another tile. Step on them back and forth, back and forth, do it over and over again. You'll see that the colors eventually get all messed up. If this wasn't the case, I could just easily use tweak palette along with tags and I wouldn't have a problem.

James, I don't understand how load palette would help. I want to simultaneously have the screen get darker and at the same time have the ability to use "brightness settings" to make the game brighter without resetting to the default palette. The Mad Cacti addressed whether or not load palette should make the chosen palette the default, or I think maybe he said reset palette shouldn't reset back to the master palette. Something to that extent... he put it on bugzilla: http://gilgamesh.hamsterrepublic.com/cg ... cgi?id=562
User avatar
Fortis
Super Slime
Posts: 244
Joined: Mon Oct 15, 2007 11:03 pm
Location: Portland OR
Contact:

Post by Fortis »

Can't you store multiple palettes now? Make a bunch of palettes with 2mas and import them, then switch between them.
� <a href="http://www.bsfantasy-comic.com/">Blasphemous Saga Fantasy</a>
� <a href="http://www.zackcorcoran.com">Comic Art & Illustration Portfolio</a>
� <a href="http://www.zantetsuken.com">Zantetsuken!</a>
User avatar
Mazin
Slime Knight
Posts: 132
Joined: Tue Oct 16, 2007 6:00 am

Post by Mazin »

So since this is a constant continuous effect in my game, the colors will eventually end up being all blended in together.
I'm not certain, but I should think that this is due to colors values that start at 63 or 0. If you do +1 and -1 on 63 (that's the max value, right?), it'll really just do -1 and it'll end up being 62.

How you might get this to work: store the amount by which the color has been changed in a variable, then every time you change the color again, just reset the palette, increment/decrement the variable if needed, and change all the colors by that amount again.
User avatar
Only One In All
Metal Slime
Posts: 356
Joined: Tue Oct 16, 2007 5:56 am
Contact:

Post by Only One In All »

Well, thanks for all your help regardless guys. Once the programmers make it so reset palette only effects the current default palette though, all my problems will be solved. :)
Post Reply