View Full Version : Flashlight?
primus1236
December 1st, 2004, 07:13 PM
Someone's asked about this before, but no one responded and I can't find the post anymore :(. Anyway, what I'm asking is if it's possible to make a flashlight like thing, it doesn't even have to have a model or anything like that. I'm just asking if it's possible, and how if so, to make a dynamic light that's coordinates are those of the player.
The reason I ask is, I'm trying to do what everyone else has said would be stupid and never work, and create a level in which the brightness of every sector is set to 0 and everything is dynamically lit. I've done some tests and it doesn't seem as impossible as people have said in the past.
Tell me what you think, and how I might do this if it's possible.
-Thanks:)
DaniJ
December 2nd, 2004, 03:24 AM
That IS impossible since currently there is no way to attach a dynamic light to the (view) player object. Atm it is not possible to attach anything to that object, something that I'm hopeful Skyjake will address as it would offer many new options if dynamic lights/particle generators/models could be attached to the player view.
Harry
December 2nd, 2004, 09:51 AM
What about in the ZooW mod where the first weapon has a big green dynamic light around it?
Also, if you know how to DED properly you can make a map with 0 brightness naturally lit with decoration DEDs; so all you need to do is put the texture on to make the room light:p
primus1236
December 2nd, 2004, 12:34 PM
Yeah Harry, that's what I was thinking of. Perhaps Jimi will read this and mabye he can help me out. I was infact thinking of doing the level just like you said though Harry. :)
Xabora
December 4th, 2004, 08:37 PM
Why not let the player model spawn an invisable particle with a light source from x,y from the model.
DaniJ
December 4th, 2004, 08:53 PM
In ZooW jimi has added new code to attach a light to player when using weapon x, not supported in jDoom.
Lights can't be attached to particles, they would have to be attached to an invisible thing but that wouldn't be the best sollution anyway. No doubt it is something we'll see at some point in the future.
mrinsane
December 4th, 2004, 10:12 PM
that would be so cool to have maybe skyjake will have it in hawthorn
Lord Kaizen
December 6th, 2004, 03:56 PM
The reason I ask is, I'm trying to do what everyone else has said would be stupid and never work, and create a level in which the brightness of every sector is set to 0 and everything is dynamically lit. I've done some tests and it doesn't seem as impossible as people have said in the past.
I actually tried doing the same thing once, it didn't look pretty.
primus1236
December 6th, 2004, 05:31 PM
It looked pretty nice on E1M2, just there were a tad too many dark areas.
Screenshots: :D
http://img9.org/p/?~doom1-ultimate-001.jpg
http://img9.org/p/?~doom1-ultimate-006.jpg <- This one gives me an idea, could I set an action that creates light for the state that player is usually in?
http://img9.org/p/?~doom1-ultimate-003.jpg
It seems like it could work with more light things. Think so?
Lord Kaizen
December 6th, 2004, 07:46 PM
What? How did you darken all the sectors in that level?
DaniJ
December 7th, 2004, 02:38 AM
Like I said before it's not possible to attach a light to the view player because it doesn't exist in the game world.
primus1236
December 7th, 2004, 03:42 AM
Like I said before it's not possible to attach a light to the view player because it doesn't exist in the game world.
I guess I'll just have to constantly be attacked by enemies all over the level to see. :p
What? How did you darken all the sectors in that level?
Just selected all of the sectors in DooM builder and set the brightness to 0... What did you do?
Lord Kaizen
December 7th, 2004, 11:32 AM
Oh I see, you modified the Doom.wad. I was hoping you found a way to set the brightness in all the levels automaticly.
primus1236
December 7th, 2004, 12:36 PM
I think you should be able to do that with the MAP INFO part of a ded, if not that, I'm sure you should be able to write a cfg to change the options in the control panel. Have you looked into that?
Jaquboss
December 8th, 2004, 12:28 PM
If yu don' like it mod it! Edit surce code to make it like in half-life..
EDIT:For the dynamic lights only levels ... this is even not hard to make , but you can recode jDoom to use args for things , because it will not be supported by map editors and etc.
So you need to make some lights (and add no model to them , remmember that they must have fulbright sprite , this is really bothering , because non-fullbright sprites will NEVER do any light..)
Well , you can“t change Z position in jDoom , unless bothering with even more lights ..
Place light things in map .. remmember that you can make very various kind of lights (changing color , blinking .. etc)
I have maked this (not used 0 light level thought) in jDoom dueling keeps conversion..
If you want more - lightmaps , args for light definitions you have to use Vavoom...
primus1236
December 19th, 2004, 05:11 PM
Fire FX -
Not much I can do about this. As when you are being attacked by the archvile the fire is rendered directly infront of the player (and bound to the players movement) it's only after you get out of sight its unbound. It can't be done using particles due to the excessive over draw this causes, which slows the game down emmensly. Theres not much I more I can do with this atm I'm affraid but I'll have another look at it.
If it's possible to bind particles to the player, could I not bind a very low number of particles that give off a great deal of light?
primus1236
December 29th, 2004, 02:59 PM
For instance a lamp could be shot out or an invisible demonic force could act as a guide, following the player around, lighting the way in hellish red ambiance.
You all lied to me. *cry*
It (appearently) is possible!
I'll have to read into this more. *book*
DaniJ
December 29th, 2004, 06:55 PM
I wrote that tutorial so the above can be done but it would be very difficult to make it behave like a flashlight, I don't know if it is possible but your welcome to try.
primus1236
December 29th, 2004, 07:30 PM
So what state do I bind the light to? A_WeaponReady?
DaniJ
December 30th, 2004, 10:14 AM
A_WeaponReady is an action, not a state. You would have to bind it to a weapon state such as SGUN but that would mean changing the behaviour of that weapon.
primus1236
December 30th, 2004, 11:03 AM
Why would it mean that? *confused*
VivaDeath
January 25th, 2005, 08:38 AM
why not edit a gun to "shoot" light the plasma gun bolts emit blue light, why not make one with no ammo like the chainsaw and it shoots invisible "bullets of light" in a constant stream, im no coder but it does sound easy (yeah...right)
primus1236
January 26th, 2005, 03:09 PM
The plasma bullets, as well as any other projectiles, go too slow, if a person turned while the flashlight was on, then the light would bend in the direction they turned. Seems like the best way to do this would be binding a light to a state.
mrinsane
January 26th, 2005, 03:44 PM
that woudlnt be a bad idea actually how bout a plasma flashlight that would be pretty cool it might also cause masssive slowdowns on the otherhand but its a great idea
DaniJ
January 26th, 2005, 04:03 PM
This would be a lot more do-able once the BIAS lights are complete, I think, I'm not sure (as Skyjake hasn't coded that bit yet) though.
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.