Page 1 of 1

Two dynamic lighting issues

Posted: Thu Dec 17, 2015 3:24 pm
by RobbyPants
I'm working on a mod that will use the Open GL dynamic lights, and I'm having two issues.

The first, and biggest is that they full-out stopped working, all of a sudden. I was experimenting with adding dynamic lights to some actors I'd created. As a refresher, I dusted off an old mod where I'd done this in the past. I fired it up, and it worked fine, so I copy-pasted the code in the GLDEF lump into the new wad file. It wasn't working. I mucked around for an hour or so before I realized that my old (already working) mod wasn't working with lights either. They weren't displaying for any actors. To further troubleshoot, I fired up the wad in Skulltag and ZDoom, and they didn't work, either (although I'm not surprised in ZDoom). I went back to Zandronum, went into the OpenGL settings and turned off dynamic lights. I closed it, reopened it, and turned it back on. Still nothing.

So, is it possible I somehow borked something in my graphics drivers or somewhere else? Where else could I check to get these working again?


Edit: I should probably add this detail, too. During that hour of mucking around between when the lights worked and when I observed them not working on that (previously working) police car actor, I had an odd issue with Zandronum. I loaded it and I could hear all the sound. I could hear myself traversing through the menu, but the screen was completely black. I managed to quit through the menu, and then started it up again, and it worked. I don't know if this is in any way related, but I might as well pass it on.

The second issue (if I ever the the lights working again!) is wondering if it's possible to attach a dynamic light to a player based on the sprites rendered. Basically, I want to make it so that if they have the flash light object and a one-handed weapon equipped, they'll get a light. If they have a two-handed weapon equipped, they won't have the light.

Typically, it seems that in GLDEF, the way you do this is to declare the actor and set the type of light and properties. Then you attach it to various frames. I pulled this off in the past with a police car that had alternating blue and red lights with the appropriate sprites. What frames would you use when using the player? Is it the various weapon frames that the player sees, or is this going to be tied to frames that would be seen by everyone else? I'm hoping it's the first one, because that'd be a lot easier for me to control.

RE: Two dynamic lighting issues

Posted: Thu Dec 17, 2015 3:38 pm
by Sean
I think this happens if there are too many dynamic lights than your computer can handle.

Key word: think. Used to have this on an older computer, but it went away when I got a better one.

RE: Two dynamic lighting issues

Posted: Thu Dec 17, 2015 4:03 pm
by RobbyPants
Sean wrote: I think this happens if there are too many dynamic lights than your computer can handle.

Key word: think. Used to have this on an older computer, but it went away when I got a better one.
I could see that being the case in certain circumstances, but it wouldn't be in this case. I replicated everything the same as when it previously worked. I went to a dark map and simply summoned the item in the console.

Note: I should probably add this to the OP. During that hour of mucking around between when the lights worked and when I observed them not working on that (previously working) police car actor, I had an odd issue with Zandronum. I loaded it and I could hear all the sound. I could hear myself traversing through the menu, but the screen was completely black. I managed to quit through the menu, and then started it up again, and it worked. I don't know if this is in any way related, but I might as well pass it on.

RE: Two dynamic lighting issues

Posted: Fri Dec 18, 2015 2:47 am
by RobbyPants
I realized I had a pretty old version of Zandronum. I installed the latest version. I'm assuming it installed over top of the previous version (I installed in the same location) because my key configurations were the same. The issue is still persisting.

RE: Two dynamic lighting issues

Posted: Fri Dec 18, 2015 3:39 am
by Ænima
To answer your second question:

GLDEFS definitions are attached to the player sprites themselves, not the weapon sprites because those technically don't exist in the level.

RE: Two dynamic lighting issues

Posted: Fri Dec 18, 2015 1:34 pm
by RobbyPants
Ænima wrote: To answer your second question:

GLDEFS definitions are attached to the player sprites themselves, not the weapon sprites because those technically don't exist in the level.
Thanks. I'd wondered about that. Is there any way to change if the light displays based on what the player has equipped?

RE: Two dynamic lighting issues

Posted: Fri Dec 18, 2015 2:26 pm
by Ænima
Weapon.PreferredSkin

RE: Two dynamic lighting issues

Posted: Tue Jan 26, 2016 8:53 pm
by RobbyPants
I figured it out. For whatever reason, I wasn't able to get it working via the menu. I ended up opening the WAD file by right-clicking and using Open With Zandronum. This gave me the hardware or software option, and I picked hardware, which fixed it.

As for the second issue (if anyone wants to do what I did), I simply used the following:

pointlight FlashLight
{
color 1.0 1.0 1.0
size 128
offset 0 16 0
}

object DoomPlayer2
{
frame PLAY { light FlashLight }
}