DarkDoomZ [Finished]

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are ONLY for YOUR 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.

Re: DarkDoomZ [Finished]

Postby Jarewill » Mon Nov 16, 2020 8:59 am

Just wanted to say that launching DarkDoomZ 1.9 results in two warnings:

Nothing major or game breaking though.
Jarewill
 
 
 
Joined: 21 Jul 2019

Re: DarkDoomZ [Finished]

Postby Caligari87 » Mon Nov 16, 2020 6:57 pm

Hotfixed in v1.9b (available at same link), thanks for the report!

8-)
User avatar
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: DarkDoomZ [Finished]

Postby shaodoomkahn » Tue Nov 17, 2020 6:50 am

now we need horror monsters settings to fit with this mode (like slenderman,freddy krueger or siren head)
shaodoomkahn
 
Joined: 01 Sep 2020
Discord: shaobrofan#6262
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: DarkDoomZ [Finished]

Postby Enjay » Sun Jan 17, 2021 7:56 pm

I have been trying to modify the flashlight so that it alerts monsters for as long as it is switched on.

I have tried inserting A_AlertMonsters(512); in various places around the code. The closest that I have come to success is having monsters be alerted when the flashlight is switched on, but the effect is only momentary and not constant. I'd like to make it so that the light alerts monsters all the time that it is switched on to give the player a reason to switch it off rather than just wandering around with the beacons of Gondor constantly lit all of the time with no consequences.

Can anyone give me a clue as to how to do this please?
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: DarkDoomZ [Finished]

Postby Dr_Cosmobyte » Sun Jan 17, 2021 8:16 pm

Hmmm, maybe the flashlight can "fire" a custom projectile that spawns an item (let's call it "AlertThing"). And make it loop while firing this actor that alerts monsters on a small radius, like A_AlertMonsters(32,AMF_EMITFROMTARGET).

The other thing i thought is to add a custom DamageType and a PainState for monsters like Pain.Flashlight and make them go to the wander/see state.
User avatar
Dr_Cosmobyte
Also known as: GAA1992
 
Joined: 04 Jun 2015
Location: Killing spiders.

Re: DarkDoomZ [Finished]

Postby Enjay » Sun Jan 17, 2021 8:31 pm

That's certainly a possibility, the problem is, that I'm unable to find a way to make anything happen more than once. I've tried adding an instruction to spawn a projectile but, just like the alerting, I could only get it to happen when I pressed the toggle button rather than constantly emitting the projectile.

This is the area of the code where I had that success:
Code: Select allExpand view
   States {
   Spawn:
      ROCK A -1;
      Stop;
   Use:
      TNT1 A 1 { invoker.ToggleActive(); }
      loop;
   }

   virtual void ToggleActive() {
      if(Active) { Active = false; owner.A_StartSound("DDZ_Flashlight_Off", CHAN_AUTO, 0, 0.5); }
      else { Active = true; owner.A_StartSound("DDZ_Flashlight_Off", CHAN_AUTO, 0, 0.5); }
   }


If I change
Code: Select allExpand view
TNT1 A 1 { invoker.ToggleActive(); }

to
Code: Select allExpand view
TNT1 A 1 { invoker.ToggleActive(); A_AlertMonsters(512);}

the monsters awake when I press the flashlight toggle (or I get one projectile (and another when I toggle the light off) if I put a projectile instruction in there) - but I don't understand why because, by my reading of that, the Use state loops. No?

Putting the Alert into the ToggleActive function, at least the way that I did it, just broke the function: I got a loud click when activating the light (as if the on and off sounds played simultaneously) but no light and, from that point on, I couldn't even get the click again without starting a new game.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: DarkDoomZ [Finished]

Postby Caligari87 » Sun Jan 17, 2021 10:39 pm

Put the alert in the DoEffect() override, under the Active check. This will have it run every tick so long as the flashlight is on.
Code: Select allExpand view
   override void DoEffect() {
      super.DoEffect();
      Quality = CVar.GetCvar("ddz_fl_quality").GetInt();
      Type = CVar.GetCvar("ddz_fl_type").GetInt();
      Mount = CVar.GetCvar("ddz_fl_pos").GetInt();
      if(Active) {
         owner.A_AlertMonsters(512);

That said, this very simply alerts monsters in hearing range as if the player were constantly firing a gun. Some optimizations could include only calling it once a second, for example.
Code: Select allExpand view
      if(Active) {
         if (level.time % 35 == 0) { owner.A_AlertMonsters(512); }

Personally I actually like the projectile idea, where it alerts monsters based on where the beam is hitting, but that is a tad more complex.

8-)
User avatar
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: DarkDoomZ [Finished]

Postby Enjay » Mon Jan 18, 2021 5:27 am

Brilliant! That's exactly the information that I needed. Thank you. And now that I know where to add it, I have also managed to get a projectile firing repeatedly using that same section of code. So I can mess with the straight A_AlertMonsters option, or set up a a projectile version and see which suits me the best.

Thanks again and to Dr_Cosmobyte for the projectile idea. :)

BTW, I do also like the custom pain state that sends the enemies into a wandering idle state too. I don't think that I'll use that this time, but I'll hang on to the idea because it could come in useful. :)



[edit]
While poking around, I noticed this:

Code: Select allExpand view
   virtual void ToggleActive() {
      if(Active) { Active = false; owner.A_StartSound("DDZ_Flashlight_Off", CHAN_AUTO, 0, 0.5); }
      else { Active = true; owner.A_StartSound("DDZ_Flashlight_Off", CHAN_AUTO, 0, 0.5); }

Both use DDZ_Flashlight_Off so, as far as I can see, the sound defined in SNDINFO called DDZ_Flashlight_On is never used.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: DarkDoomZ [Finished]

Postby JohnnyTheWolf » Mon Jan 18, 2021 8:10 am

This looks like a good idea of improvement for DarkDoomZ! Do you plan on releasing it to the public?

If so, will you upload it as a separate download or is your modification going to be integrated to the main file?
JohnnyTheWolf
 
Joined: 05 Oct 2015

Re: DarkDoomZ [Finished]

Postby Enjay » Mon Jan 18, 2021 8:26 am

I hadn't really planned on releasing a modified version of DarkDoomZ. I guess I could post something here if I get something that I'm happy with.

What I have currently got working is a projectile that flies out about as far as the effective range of the flashlight roughly every half second. It alerts any monsters that it comes within 256 units of. So, in most cases, it gives the impression that the light shining in the direction of the enemies is what alerts them.

I've also kept just the raw alerting of monsters from the player location. Every second, the player also alerts monsters in a 256 unit radius (may tweak). So, that gives the impression that the monsters are getting woken up by detecting someone nearby with a flashlight even if it isn't pointed directly at them.

None of the above is toggleable or adjustable in any way - and it might be beyond me to do that. So, I'll happily post what I have (when I have it) and if someone wants to make a better, more professional, version for integration into a modification of DarkDoomZ, then they can. To be honest, the bits that I have done are the easy ones and if someone can do the trickier stuff, they could easily replicate what I have done themselves.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: DarkDoomZ [Finished]

Postby vsonnier » Fri Mar 19, 2021 2:16 pm

I've implemented for Brutal Doom Black Edition a working solution, which roughly lies on the following principles:

1) A Lamp beam is a cone of half-angle Theta. Therefore, A beam intersects a monster if the angle between the Vector_Player_To_Monster and the Vector_Player_To_Beam_Direction <= Theta.
which translates to is_alerting = (Vector_Player_To_Monster dot Vector_Player_To_Beam_Direction ) > cos (Theta)
2) Iterate Monsters around Player , test and for each (is_intersecting = true) AND (CheckSight = true) do monster.lastheard = Player
3) Profit !

I've also added other goodies like simulating a "real electric torch" where you can make the Light beam more or less wide, i.e more or less intense accordingly (supposing constant power), and consequently alterting monsters also accordingly : the more concentrated, the farther away monsters can be alerted.
Those additions may be rather complicated, but only 1) and 2) are needed to implement a Light altering monsters like Brutal Doom v21 has, only smarter :)

Here is in attachement the core Zscript used to implement all this, using Caligari87 FlashLight as base of course, hope you will find it usefull.

Edit:
Vector_Player_To_Monster and Vector_Player_To_Beam_Direction are supposed to be unit vectors there, obviously.

A previous version of the BE Flashlight, done before I heard of ShericalCoordinates function and examples (https://zdoom.org/wiki/SphericalCoords), can be found here as a standalone addon :
https://www.moddb.com/mods/brutal-doom/addons/bdbe-flashlight-for-brutal-doom-v21

This code is more DIY and monster position was taken from its "foot" so is not entirely correct but I didn't bother to update the addon yet.
You do not have the required permissions to view the files attached to this post.
vsonnier
 
Joined: 11 Apr 2019
Github ID: vsonnier
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: DarkDoomZ [Finished]

Postby ClessxAlghazanth » Tue Sep 14, 2021 11:51 pm

Not what's wrong but flashlight only seems to lighten a circular area around the player , no matter what the settings are (flashlight placement , density etc)

On GZDoom 4.6.1 gles , using Opelgl es renderer , hw acceleration

Tried on both vanilla and mods including DRLA , Beautiful Doom , Doom Incarnate etc but the result is same

Any ideas on this ?

Best regards
You do not have the required permissions to view the files attached to this post.
User avatar
ClessxAlghazanth
 
Joined: 17 Feb 2019

Re: DarkDoomZ [Finished]

Postby Caligari87 » Wed Sep 15, 2021 12:43 am

Spotlights in GZDoom are a fairly "modern" rendering feature, so I'm almost 100% certain this is due to lacking shader support on either your video hardware / drivers, or the GLES renderer due to the very old hardware support it targets. Nothing I can do about it on my end unfortunately.

8-)
User avatar
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: DarkDoomZ [Finished]

Postby Rachael » Wed Sep 15, 2021 4:58 am

Spotlights do not work properly in GLES - period. I don't know what could or should be done about it, though.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: DarkDoomZ [Finished]

Postby m1lk » Thu Sep 16, 2021 11:03 pm

great mod, I use it to make everything just a little dimmer
User avatar
m1lk
 
Joined: 04 Apr 2021
Operating System: Mac OS X 10.8 or later
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

PreviousNext

Return to Gameplay Mods

Who is online

Users browsing this forum: Hey Doomer, retronutcase and 19 guests