Turning off the lights [SOLVED]

Started by frission, Thu 11/10/2007 02:33:52

Previous topic - Next topic

frission

What's the best way to have the lights in the room "turn off"? I can imagine doing it a few ways but all of them seem rather hacky to me. How would you do it? I'm not experienced with animated backgrounds but that struck me as one possibility (have a frame that was the same room but with the lights off and switch to it when the switch was hit). Any and all suggestions would be appreciated! :-)

theatrx

There's a bunch of ways to do this.

1/  If the player character hits a hotspot or stands on a region... change rooms to a darkened version of the same room or

2/ You can tint the screen so there is very little light in the room
Life is a banquet and most poor sonsofbitches are starving to death

frission

Quote from: theatrx on Thu 11/10/2007 06:02:57
There's a bunch of ways to do this.

1/  If the player character hits a hotspot or stands on a region... change rooms to a darkened version of the same room or

2/ You can tint the screen so there is very little light in the room

#2 seemed like something easier but I couldn't figure out how to tint things and make them darker. All of the color tinting functions seemed to make them lighter, from what I could tell. Any thoughts?

Khris

You can use a semi-transparent GUI as big as the screen with a black background.

frission

#4
Quote from: KhrisMUC on Thu 11/10/2007 16:00:40
You can use a semi-transparent GUI as big as the screen with a black background.

Oooh... that's super clever and might just be exactly what I was looking for. Thanks.

UPDATE: I gave it a shot and this looks pretty good. Thanks for the suggestion.

Dualnames

Well you could try to import the first background(light) then import the second(dark) to the animated frames. Then add to the first time enter room

Setbackgroundframe(0);

Then go to the room open the hotspot/object where when the player clicks the room will get dark and add the following lines

if (GetBackgroundFrame==0) {
Setbackgroundframe(1);
}
else {
SetBackgroundFrame(0);
}
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Khris

You can do "SetBackgroundFrame(1-GetBackgroundFrame());".

Using this method requires one to change the images of all objects, too.

Ashen

So, frission, is this solved (in which case, please edit the title), or are you still taking suggestions? Not that I have one, I think the best ways have been suggested already. I'd probably go with the semi-transparent GUI, as I couldn't be bothered changing the graphics of, or tinting, everything on screen. However, if it's only one or two rooms, actually drawing 'dark' versions of everything would probably look better - you could do hightlight/shadow effects, instead of just making them 'the same but darker'.
I know what you're thinking ... Don't think that.

frission

Quote from: Ashen on Tue 16/10/2007 12:30:41
So, frission, is this solved (in which case, please edit the title), or are you still taking suggestions? Not that I have one, I think the best ways have been suggested already. I'd probably go with the semi-transparent GUI, as I couldn't be bothered changing the graphics of, or tinting, everything on screen. However, if it's only one or two rooms, actually drawing 'dark' versions of everything would probably look better - you could do hightlight/shadow effects, instead of just making them 'the same but darker'.

Oh, this is solved. Thanks for reminding me.

Basically the two best options are the GUI overlay, which works fine in some cases, and maybe switching animated backgrounds, if the scene requires something more than that. Either way both of those options work great, and for a quicky-"make them turn on the lights before seeing the grisley scene" the GUI method works fine (one could imagine combining it with a few other tricks too if you want certainly things to be genuinely not visible until they turn on the lights).

SMF spam blocked by CleanTalk