[Code] Beam Flashlight
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
[Code] Beam Flashlight
This is a "rejuvenation" of the flashlight code used in LilWhiteMouse's "Cammy".
How this is done, is by firing 19 flashlight "beam" projectiles in order to create a more realistic flashlight effect.
It looks really nice:
The flashlight is easily tweakable, by changing two decorate constants, you can get this "shoulder-mounted" effect:
Download:
How this is done, is by firing 19 flashlight "beam" projectiles in order to create a more realistic flashlight effect.
It looks really nice:
The flashlight is easily tweakable, by changing two decorate constants, you can get this "shoulder-mounted" effect:
Download:
You do not have the required permissions to view the files attached to this post.
Last edited by The Zombie Killer on Fri Nov 01, 2013 1:02 am, edited 6 times in total.
-
- Posts: 137
- Joined: Fri Oct 18, 2013 7:22 am
- Location: In front of hell, looking down into the deep red abyss.
Re: [Code] Beam Flashlight
I'm try to use this in skulltag and i get following error:
script error, "beamflashlight.pk3:decorate.txt" line 14:
Invalid state parameter nodelay
script error, "beamflashlight.pk3:decorate.txt" line 14:
Invalid state parameter nodelay
-
- Posts: 2274
- Joined: Tue Jun 30, 2009 1:31 pm
Re: [Code] Beam Flashlight
That's because Skulltag/Zandronum can't use the NoDelay feature. Use one of the latest GzDOOM builds
Also I just tried it out. It's pretty cool except when you walk towards a wall the dynamic lights "blink", and it looks kinda weird.
Also I just tried it out. It's pretty cool except when you walk towards a wall the dynamic lights "blink", and it looks kinda weird.
-
- Posts: 128
- Joined: Sun Sep 22, 2013 1:13 pm
- Location: Mega Lo Mart
Re: [Code] Beam Flashlight
Dude, awesome! Haven't downloaded yet, but the principles for this would be usable for a sphere of light around the player, right?
-
- Posts: 137
- Joined: Fri Oct 18, 2013 7:22 am
- Location: In front of hell, looking down into the deep red abyss.
Re: [Code] Beam Flashlight
Mikk- wrote:That's because Skulltag/Zandronum can't use the NoDelay feature. Use one of the latest GzDOOM builds
Also I just tried it out. It's pretty cool except when you walk towards a wall the dynamic lights "blink", and it looks kinda weird.
thanks
-
-
- Posts: 26571
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: [Code] Beam Flashlight
I think that I managed to minimise the "blinking" with my own implementation of LWM's code but I'm not sure where my files are ATM. I'll be honest, I can't really remember what I did. I think that I adjusted the speed and/or the spawn distance/frequency of the actors and also tweaked the dynamic lights to my own personal preferences. If I get a chance, I dig out my version of this and have a look. I'm not saying that mine is any better, just (slightly) different and closer to what I wanted at the time.
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: [Code] Beam Flashlight
I've added a Zandronum compatible version. Should [hopefully] work in Skulltag too.Lisac_the_fox wrote:I'm try to use this in skulltag and i get following error:
script error, "beamflashlight.pk3:decorate.txt" line 14:
Invalid state parameter nodelay
Yeah, I've noticed that tooMikk wrote:It's pretty cool except when you walk towards a wall the dynamic lights "blink", and it looks kinda weird.
I guess so, yeah. It's more of a cone of light than a sphere thoughThomsonI wrote:but the principles for this would be usable for a sphere of light around the player, right?
Looking forward to messing with that if you can manage to dig it up.Enjay wrote:I think that I managed to minimise the "blinking" with my own implementation of LWM's code but I'm not sure where my files are ATM. I'll be honest, I can't really remember what I did. I think that I adjusted the speed and/or the spawn distance/frequency of the actors and also tweaked the dynamic lights to my own personal preferences. If I get a chance, I dig out my version of this and have a look. I'm not saying that mine is any better, just (slightly) different and closer to what I wanted at the time.
__________________________________________________
Zandronum version added. It's also compatible with GZDoom. The Zandronum version is probably more stable than the GZDoom version, so I'll update the GZDoom one to use the same programming methods that I used in the Zandronum version.
The only real difference between the Zandronum and GZDoom versions is the fact that the GZDoom version uses named scripts.
Edit: GZDoom version updated.
Edit 2: Both versions updated.
-
- Posts: 137
- Joined: Fri Oct 18, 2013 7:22 am
- Location: In front of hell, looking down into the deep red abyss.
Re: [Code] Beam Flashlight
Now I tried the Zandronum version and Its aren't working. Maybe its don't working because I don't have openGL.
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: [Code] Beam Flashlight
That would be why, dynamic lights are GL-exclusive. They aren't in software.Lisac_the_fox wrote:Maybe its don't working because I don't have openGL.
-
- Posts: 2059
- Joined: Mon Feb 07, 2011 5:02 am
Re: [Code] Beam Flashlight
tasty! such a shame this kinda thing is impossible in standard zdoom...
-
- Posts: 452
- Joined: Sun Nov 17, 2013 12:27 pm
- Graphics Processor: nVidia with Vulkan support
- Location: MIA between doomed dimensions
Re: [Code] Beam Flashlight
Is there a way to get this flashlight blocked by middle textures??
impassible bushes are fine because the flashlight gets blocked by the raised floor in the middle of the bush, but if the bush is made only by middle textures the flashlight goes through the bush without affecting it...
See here what i mean :
https://fbcdn-sphotos-h-a.akamaihd.net/ ... 5749_n.jpg
impassible bushes are fine because the flashlight gets blocked by the raised floor in the middle of the bush, but if the bush is made only by middle textures the flashlight goes through the bush without affecting it...
See here what i mean :
https://fbcdn-sphotos-h-a.akamaihd.net/ ... 5749_n.jpg
-
- Posts: 137
- Joined: Fri Oct 18, 2013 7:22 am
- Location: In front of hell, looking down into the deep red abyss.
Re: [Code] Beam Flashlight
I get new graphic card, via uni chrome, and I have opengl 1.2 with latest drivers. I can't find where in gzdoom I can change to opengl.
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: [Code] Beam Flashlight
As far as I know, GZDoom requires at least OpenGL 1.4.
There is no option to switch to OpenGL because it is in OpenGL mode by default. However, since GZDoom still contains the software renderer, you can switch between GL and software with the vid_renderer console command
vid_renderer 0 - Software
vid_renderer 1 - OpenGL
There is no option to switch to OpenGL because it is in OpenGL mode by default. However, since GZDoom still contains the software renderer, you can switch between GL and software with the vid_renderer console command
vid_renderer 0 - Software
vid_renderer 1 - OpenGL
-
- Posts: 137
- Joined: Fri Oct 18, 2013 7:22 am
- Location: In front of hell, looking down into the deep red abyss.
Re: [Code] Beam Flashlight
Thanks anyway.
-
- Posts: 137
- Joined: Fri Oct 18, 2013 7:22 am
- Location: In front of hell, looking down into the deep red abyss.
Re: [Code] Beam Flashlight
Working with my opengl 1.2 . Flashlight is great.
Last edited by Lisac_the_fox on Tue Aug 26, 2014 6:29 pm, edited 1 time in total.