Page 1 of 1

[ZScript] Flares

PostPosted: Mon Aug 06, 2018 4:23 pm
by Rip and Tear
What is this?
This is a library that allows you to quickly add flares to actors. Flares are simple sprites with additive rendering. Flares will automatically follow the actor that they are attached to. Various attributes of the flare can be configured.

What does it look like?
Image

How do I use it?
Download the attached file and read the instructions, documentation, and examples provided in the contained zscript.txt file.

Feedback welcome.

Re: [ZScript] Flares

PostPosted: Thu Aug 16, 2018 9:02 pm
by Endie
Nice work, but there's a way to actor check sight?

when using Decorate, you can call A_CheckSight, so if the item that carry the flare is out of player sight, it will hide the flare instantly, and when the item gets back, the flare is shown again

Re: [ZScript] Flares

PostPosted: Fri Aug 17, 2018 6:30 am
by Cherno
Kinda related, is it possible to have a flare that is completey visible (even if it would be clipped by other scenery) if the player sees it's center, and completely hidden when the player doesn't see it's center? Basically, like a real-life lensflare works, and how most modern games do it.

Re: [ZScript] Flares

PostPosted: Fri Aug 17, 2018 7:53 am
by Rip and Tear
Cherno wrote:Kinda related, is it possible to have a flare that is completey visible (even if it would be clipped by other scenery) if the player sees it's center, and completely hidden when the player doesn't see it's center? Basically, like a real-life lensflare works, and how most modern games do it.

Endie wrote:Nice work, but there's a way to actor check sight? when using Decorate, you can call A_CheckSight, so if the item that carry the flare is out of player sight, it will hide the flare instantly, and when the item gets back, the flare is shown again

This is something I would definitely like to add in the future, but I’ve held off on it so far because I don’t have a great understanding of how multiplayer works in the GZDoom engine and I don’t want to accidentally break this library for multiplayer.

Re: [ZScript] Flares

PostPosted: Fri Aug 17, 2018 9:32 am
by Endie
Also, when i tested your attatchment, the flare was behind the column. are you using any Sprite clipping option? or it depends of the angle of view?

Re: [ZScript] Flares

PostPosted: Fri Aug 17, 2018 9:53 am
by Rip and Tear
Endie wrote:Also, when i tested your attatchment, the flare was behind the column. are you using any Sprite clipping option? or it depends of the angle of view?

I tested with a bunch of settings (including sprite clipping) and could not reproduce the issue.

Re: [ZScript] Flares

PostPosted: Fri Dec 14, 2018 4:29 pm
by Ghost Prototype
Well done
Spoiler:

Re: [ZScript] Flares

PostPosted: Tue Mar 05, 2019 7:02 pm
by Rip and Tear
Here’s an updated version of the library which should hopefully improve performance of flares.