Darken/Fade out gameplay but not menus

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
kylekrack
Liquid Metal Slime
Posts: 1240
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Darken/Fade out gameplay but not menus

Post by kylekrack »

Is there any way to darken the game slightly, such as with using this script, and have menus/slice collections maintain their original colors?

The goal is to make the actual game fade a bit while the menu appears. I think it would make a nice effect.

The script I have uses tweak palette to go two shades darker. Would a different command work better?

Code: Select all

variable (loop)
for(loop,0,-31,-1) do(
reset palette
tweak palette(loop*2,loop*2,loop*2)
update palette
wait(2)
# gradual fade out
My pronouns are they/them
Ps. I love my wife
User avatar
Feenicks
Metal Slime
Posts: 696
Joined: Tue Aug 10, 2010 9:23 pm
Location: ON THE AIR IN THE AIR
Contact:

Post by Feenicks »

You can devote a portion of the palette exclusively to UI stuff, and then use the optional arguments of the tweak palette command to have every portion of the palette but the UI colors change.

Code: Select all

variable (loop) 
for(loop,0,-31,-1) do( 
reset palette 
tweak palette(loop*2,loop*2,loop*2,1st_nonUIcolor,last_nonUIcolor) 
#might have to use this command multiple times depending on palette setup
update palette 
wait(2) 
# gradual fade out 
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

One trick I used in Paladin Traducer 's menus was to create a black rectangle slice underneath the slices, and then I manipulated its <a href="http://hamsterrepublic.com/ohrrpgce/doc ... zziness</a> to do a fade.

It is a grainy pixel-dither fade rather than the smooth fade you get with palette manipulation, but it is simple and it works.
User avatar
kylekrack
Liquid Metal Slime
Posts: 1240
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

For simplicity's sake, I may just use fuzzy boxes. I was going to do that, then thought it might be cooler to do a legit fade out. Another plan I had was to make the UI colors for the menu painfully bright, so they seem normal after the fade.
My pronouns are they/them
Ps. I love my wife
Post Reply