looking through spyglass effect

Started by Electroshokker, Sat 12/11/2005 11:04:09

Previous topic - Next topic

Electroshokker

I've been trying something here:

I want to have a dark overlay of my background (pitch-black), with one area (an object or something) which can move over it in any direction, which makes the background under it visible again.

like so:



currently, I have 'solved' this, by creating an object twice the size of the background, with a transparent circle cut out in the center. By moving this object, I get the desired effect.

(this has limitations for the movement of the circle, but by increasing sprite dimensions, file size is also increased)

Unfortunately, this object's sprite takes up about 2 Mb. Is there any way I can get the same effect without having to create such a large sprite?

Barbarian

#1
You might be able to achieve a similar effect using the wonderful "Flashlight Plugin":
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=22733.0

Though I'm not sure if this plugin is compatible with the more recent versions of the AGS editor.

I've used the Flightlight Plugin with a couple of my games to great effect, the most recent one being my short game "Dark of Night",
http://www.adventuregamestudio.co.uk/games.php?action=detail&id=637
which you can check out to see how the effect looks like in action.
You could also adjust the settings of the Flashlight Plugin to black-out everything around the circle of "light" to perhaps get that "spyglass" effect you're looking for.

If you don't like the Flashlight Plugin idea, then perhaps trying the most recent versions of the AGS editor might help with the new built in "Compress Sprite File" option.
Conan: "To crush your enemies, see them driven before you, and to hear the lamentation of the women!"
Mongol General: "That is good."

Blade of Rage: www.BladeOfRage.com

Electroshokker

#2
EDIT:

Flashlight plugin 1.2 works just fine with ags 2.70

Thanks. I'm gonna experiment a bit more with it.

Snarky

Another thing you could try (e.g. if you don't want to use plugins) would be to make the sprite only the circle itself (including the blurry bit), and rawdraw the rest of the black area yourself. You might not save much space in the newest AGS version that compresses sprites (plain black areas compress extremely well), but making your sprite smaller might speed up the game.

SMF spam blocked by CleanTalk