Light switch effects

Completed patches for Keen2.
Ezjay
Posts: 158
Joined: Fri Feb 27, 2004 1:15 pm
Location: Amsterdam

Light switch effects

Post by Ezjay »

I've been thinking about the light switch in keen 2.
Im not sure my theory is right so ill ask some questions along the way. If the answer to any of these questions wrong then my whole theory is kind of pointless.
First question:

What happens when you switch the lightswitchbutton in keen2, is that the game changes to a different palette, right??

In the game the palette changes to one that has dark colours for bright colours, black for dark colours and light grey, and the original colour for white and bright cyan.
Question two:

Is this palette the game uses when the light is switched off one of the fade in-fade out frames?

When you enter or exit a level, the sreen fades to black. I assume this is done the same way. I hope this doesnt use the same palette, since that would destroy the possibility of all the cool effects i have in mind.
Now from what i've read in this topic, i believe changing that palette is possible (and im not talking about changing it to new colours with the rgb value - just the original ones). Wich is my third question:

Is it possible to change this palette?

So with the new palette, instead of changing the colours to darker colours the game would change the colours to whatever you want, imagine the possibility's.
For example: change the palette to replace all dark colours with bright colours and all bright colours with white, creating an effect that is the oposite of that in the original game. You could also give everything a purple tint, or just make all yellow lamps turn into red (going into red alert:))

get the idea?
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Yes, dunno about this really. I've thought about this kind of stuff as well, and almost asked it as well but haven't done that since I haven't had use for it yet.

But I agree, that would be really neat. Changing the colours to some dangerous red or something would be really cool, like you said.

But too bad I assume it uses the same function everywhere; or at least part of it.
Ezjay
Posts: 158
Joined: Fri Feb 27, 2004 1:15 pm
Location: Amsterdam

Post by Ezjay »

If youre modding keen1 there's not much use for a licht switch. Could be a nice extra but you can't force the player to push the button. Altough i have been thinking about some kind of maze that would be easyer with the lights off... something like that maybe, i dunno

I hope your not right about the switch using the fade palette....
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

re: palletes

Post by XkyRauh »

No, the pallete does not change when the lightswitch is thrown. It's just color substitution. For example, when you toss the lightswitch...

Light Colors --> Dark Colors
i.e. Lt. Red --> Dk. Red, Lt. Blue --> Dk. Blue, etc.

However...

Both Lt. and Dk. Grey --> Black.

and

White --> White

Other than that, it's all just pallette substitution. At least, that's my observation.

--Xky
Ezjay
Posts: 158
Joined: Fri Feb 27, 2004 1:15 pm
Location: Amsterdam

Post by Ezjay »

Obviously, that's what i ment. Perhaps colour substitution is a better term though.

This might make things more clear:

Code: Select all

Normal colours                                           
1 black		
2 blue 		
3 green 		
4 cyan 		
5 red 		
6 magenta 	
7 brown 		
8 bright gray 	
9 gray 		
10 bright blue 	 
11 bright green 	
12 bright cyan 	
13 bright red 	
14 pink 		
15 yellow              
16 white 		

With the light switched off            
1 black		
2 black		
3 black		
4 black		
5 black		
6 black		
7 black		
8 black	
9 black
10 blue 		 
11 green 
12 bright cyan	
13 red 	
14 magenta
15 brown    
16 white	

Example off what might be possible:
1 blue
2 blue
3 cyan
4 blue
5 blue
6 cyan
7 cyan
8 white
9 blue
10 bright blue	 
11 bright cyan
12 white
13 bright blue
14 bright grey
15 bright green
16 bright blue
this example would give everything a blue tint when the button is switched
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

re: substitution

Post by XkyRauh »

Ahh--sorry I misunderstood you. :-}

This would be a nice expansion to the already-existing palette patch.

--Xky
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin »

You should be able to achieve this with a bit of fiddling with the current palette patch... have you given it a go?
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Nope. :o
But I'll try now.
Where's my Keening gloves? Ah, cheers.. Here I go.
Edit: Argh, no clue..
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin »

Is this palette the game uses when the light is switched off one of the fade in-fade out frames?
Yes, that's correct. There are four different palettes used when fading in/out, and the second one is re-used when the lights are off (the fourth on is for when the lights are on).
Here's a patch to let you change these palettes:

Code: Select all

%ext ck1
%version 1.31

# The four palettes used when fading, from darkest to lightest.
# The second one is also used when the light switch is off
%patch $15558  $00 $00 $00 $00 $00 $00 $00 $00  $00 $00 $00 $00 $00 $00 $00 $00
%patch $15569  $00 $00 $00 $00 $00 $00 $00 $00  $00 $01 $02 $03 $04 $05 $06 $07
%patch $1557A  $00 $00 $00 $00 $00 $00 $00 $00  $18 $19 $1A $1B $1C $1D $1E $1F
%patch $1558B  $00 $01 $02 $03 $04 $05 $06 $07  $18 $19 $1A $1B $1C $1D $1E $1F

%end

Code: Select all

%ext ck2
%version 1.31

# The four palettes used when fading, from darkest to lightest.
# The second one is also used when the light switch is off
%patch $19BE8  $00 $00 $00 $00 $00 $00 $00 $00  $00 $00 $00 $00 $00 $00 $00 $00
%patch $19BF9  $00 $00 $00 $00 $00 $00 $00 $00  $00 $01 $02 $03 $04 $05 $06 $07
%patch $19C0A  $00 $00 $00 $00 $00 $00 $00 $00  $18 $19 $1A $1B $1C $1D $1E $1F
%patch $19C1B  $00 $01 $02 $03 $04 $05 $06 $07  $18 $19 $1A $1B $1C $1D $1E $1F

%end
Ezjay
Posts: 158
Joined: Fri Feb 27, 2004 1:15 pm
Location: Amsterdam

Post by Ezjay »

Thnx for making that, but:
Yes, that's correct. There are four different palettes used when fading in/out, and the second one is re-used when the lights are off (the fourth on is for when the lights are on).
That sucks! It means when i want to do all those effects i mentioned the game won't fade in and out right. A lightswitch that makes everything light combined with fading to white is possible though - but it's not the same. Is it possible to change the lightswitchpalette without affecting the fade palettes?

In keen2, white and bright cyan remain unchanged with the lights off. However, this does not show in the patch (all colours change). Why?
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Wow, sounds like a cool patch again! :)
xtraverse
Patch Crafter
Posts: 290
Joined: Tue Sep 02, 2003 6:42 pm
Location: Easter Island
Contact:

mayakds

Post by xtraverse »

Maybe you could make a patch to disable fades?
Ilsoap
Posts: 197
Joined: Tue Sep 02, 2003 4:04 am
Location: Canada
Contact:

Post by Ilsoap »

In keen2, white and bright cyan remain unchanged with the lights off. However, this does not show in the patch (all colours change). Why?
All the colors do change, the white changes to light grey and the light cyan changes to dark cyan. The colors around it are just so dark, they look like they're still as bright as they were.

Here's an experiment. Go into MSPaint, and make a picture where one side is black and one side is white. Then, draw two squares of the same color grey, one on each side. The grey square in the dark half will look brighter than the grey in the light half.
CaptainKeen
Posts: 78
Joined: Sun Feb 29, 2004 5:30 pm
Location: the Netherlands

Post by CaptainKeen »

that is just not true most colors work that way except white and light cyan
take a good look and youll see.because the colors around it become darker it will look like they even get brighter.
CaptainKeen
Posts: 78
Joined: Sun Feb 29, 2004 5:30 pm
Location: the Netherlands

Post by CaptainKeen »

ow i think it is. I looked a hundred times be4 i saw it
Post Reply