Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: anarchist on February 23, 2013, 05:04:50 PM

Title: Brighten part of the scene
Post by: anarchist on February 23, 2013, 05:04:50 PM
Hello everybody

I plan to have a scene which will be completely dark when the character enters. Then, when the character finds a pack of matches and lights one, I wish to have an effect where a circle area around the character is brighter than the completely dark scene. The character will be able to walk around the scene therefore brightening parts of the scene. The match effect will stop after a few seconds when the match goes out.

I assume that this is not a trivial requirement. Has someone tried this before, is there a workaround? My game is full 2D.

Thank you
Title: Re: Brighten part of the scene
Post by: odnorf on February 23, 2013, 05:44:53 PM
There is this flashlight script (http://forum.dead-code.org/index.php?topic=639.0). The light follows the cursor but you can easily change that to character position (check Update() function call in flashlight.script as it says in the instructions).
Title: Re: Brighten part of the scene
Post by: anarchist on February 23, 2013, 07:26:23 PM
Thanks a lot odnorf that was exactly what I wanted. And thanks Mnemonic for the script.