Multi-spotlight flashlight

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!
Post Reply
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm
Contact:

Multi-spotlight flashlight

Post by dodopod »



A flashlight made with GZDoom's spotlights. The beam is divided into a hotspot and spill, with an optional bounce light. The bounce looks bad as often as it looks good, in my opinion, so it's off by default (range set to 0). The flashlight flickers when its power is low, and flickers more the lower it gets. In this PK3, the flashlight is a weapon, but the beam itself is controlled by a powerup, so it should be easy to change it into an inventory item, give it to monsters, etc.

Changes:
v1.0.2
  • If energy type is "", flicker is controlled by powerup duration.
  • If flicker threshold is < 0, it's assumed to represent a number of seconds.
v1.0.1
  • Swapped x & y beam offsets, since they were the wrong way around.
Download:
flashlight-v1.0.2.pk3
Multi-spotlight flashlight v1.0.2
(15.37 KiB) Downloaded 1004 times
Old versions:
flashlight-v1.0.1.pk3
Multi-spotlight flashlight v1.0.1
(15.34 KiB) Downloaded 184 times
flashlight.pk3
Multi-spotlight flashlight v1.0.0
(15.34 KiB) Downloaded 208 times
Last edited by dodopod on Wed Jul 10, 2019 6:13 pm, edited 2 times in total.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Multi-spotlight flashlight

Post by Nash »

That's an interesting way to simulate light cookies. :) Good stuff!
User avatar
Enjay
 
 
Posts: 27131
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Multi-spotlight flashlight

Post by Enjay »

Cool flashlight; one of the more effective ones I've seen.

Unfortunately, it doesn't sit very nicely with ambient occlusion:

User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Multi-spotlight flashlight

Post by Nash »

I don't think that's ambient occlusion's fault... that looks like artifacts from a low res shadowmap. You can toggle shadowmaps on and off to confirm that that is the culprit... to make it better, I suppose you can crank the shadowmap resolution to maximum (2048) but even then it won't be eliminated completely...

(feel free to correct me if I'm wrong though; but I've had similar problems when spotlights became a thing in the engine and - like everyone at the time - I started playing with player-attached spotlight-flashlights... and one of the first things I noticed is that that pixelated stuff happens with low res shadowmaps)
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm
Contact:

Re: Multi-spotlight flashlight

Post by dodopod »

v1.0.1 is out. It's a small update: I accidentally had the x & y beam offsets backwards.
AlphaSoraKun
Posts: 409
Joined: Fri Feb 10, 2017 2:17 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)

Re: Multi-spotlight flashlight

Post by AlphaSoraKun »

Judging by the video. I'd say that this looks quite impressive.
osjclatchford
Posts: 2062
Joined: Mon Feb 07, 2011 5:02 am

Re: Multi-spotlight flashlight

Post by osjclatchford »

Very nice work. Looks quite realistic indeed!

Glad to see my flashlight HUD sprite is still getting some use!
User avatar
doomfiend
Posts: 526
Joined: Sun Aug 27, 2006 6:10 am
Location: some where

Re: Multi-spotlight flashlight

Post by doomfiend »

Would it be possible to have this as an optional file that replaces the Light amp goggles? (that shuts off when light amp powerup runs out?) I would absolutely love that; provided its a headlamp and not a flashlight lol
I find the lightamp makes maps look generally ugly with its full bright setting :C
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm
Contact:

Re: Multi-spotlight flashlight

Post by dodopod »

I just made a small edit to the code to make that easier. Now all you have to do is:

Code: Select all

class Headlamp : Infrared replaces Infrared
{
    Default
    {
        Powerup.Type "PowerHeadlamp";
    }
}

class PowerHeadlamp : PowerFlashlight
{
    Default
    {
        Powerup.Duration -20;
        PowerFlashlight.EnergyType "";
        PowerFlashlight.FlickerThreshold -10;
        PowerFlashlight.Offset 0, 0, 32;
    }
}
User avatar
doomfiend
Posts: 526
Joined: Sun Aug 27, 2006 6:10 am
Location: some where

Re: Multi-spotlight flashlight

Post by doomfiend »

I absolutely love this, thank you!
User avatar
WaterMelon 64
Posts: 2
Joined: Fri Apr 17, 2020 2:32 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: México

Re: Multi-spotlight flashlight

Post by WaterMelon 64 »

Hello, Is an awesome work, really is a noise flashlight, can i use it for my mod?
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm
Contact:

Re: Multi-spotlight flashlight

Post by dodopod »

Sure, go ahead.
XLightningStormL
Posts: 394
Joined: Mon May 09, 2016 1:38 am
Location: Anywhere but here
Contact:

Re: Multi-spotlight flashlight

Post by XLightningStormL »

Any chance the spotlight beams could alert monsters a-la Soundless Mound, Seems kinda odd not for it to alert monsters considering using flashlights should be equivalent to having a neon sign pointing at you.
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm
Contact:

Re: Multi-spotlight flashlight

Post by dodopod »

I considered that when I made it. I think you could spawn an actor that sticks to the center of the flashlight's spot, and calls A_AlertMonsters every tic.
irukanjji
Posts: 139
Joined: Fri Feb 28, 2014 4:27 pm

Re: Multi-spotlight flashlight

Post by irukanjji »

Doom3 Flashlight is back :ninja:
Post Reply

Return to “Resources”