Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: arthur.com on Mon 30/04/2007 13:52:17

Title: shadows in a cutscene
Post by: arthur.com on Mon 30/04/2007 13:52:17
Can anyone help me?
I want to make a cutscene of a mad proffesor laughing like in a horror movie and
a lightning strikes while hes laughing.
Could anyone tell me how do i make his shadow in the lightning?
Title: Re: shadows
Post by: GarageGothic on Mon 30/04/2007 14:44:26
If this is a one-time event, and the scientist is always in the same position when the lightning strikes, the easiest solution would be to just create the shadow as a black silhouette, and assign the sprite to an object. The object would be 100% transparent (invisible) for most of the time, but while the lightning strikes you set the transparency to 50%.

It would be easier to tell you the best method if you show a screenshot of the scene. How do you animate the flash from the lightning itself? If you're already drawing that as an animation, just draw the shadow on top of it.
Title: Re: shadows in a cutscene
Post by: Ali on Mon 30/04/2007 15:30:07
Alternately, you could use draw a version of your background with the shadow in place and set the background frame from normal to lighning at the appropriate time. The advantage of this is that you wouldn't need to darken the shadow area, you could brighten everywhere else, which could look more realistic.

GarageGothic's suggestion is more flexible, but I think using background frames could be simpler. Also, you wouldn't risk the game slowing down on slower computers.
Title: Re: shadows in a cutscene
Post by: GarageGothic on Mon 30/04/2007 15:35:35
Ali is right that there's a chane of a transparent object causing a slowdown. I do think a full background is a waste of file space though (even if nearly identical screens should compress pretty well).
As I said, it all depends on how the lightning itself is implemented. If it's just a square area on the wall lighting up to mimic lightnig through a window, then paint the shadow as a non-lit area of that square.