Page 117 of 119

Re: [Finished] The Russian Overkill - 3.0c

Posted: Mon Mar 08, 2021 11:10 am
by Slugrprod
hey guys, i made a desktop icon for the mod, i'd like to know if you were interested in using it.

Re: [Finished] The Russian Overkill - 3.0c

Posted: Fri Mar 19, 2021 2:10 pm
by zdusr
Hi!

Would it be possible to include fixes for slow super weapons in your next release? Normally it is not a problem but with slaughter maps with 5k and more more monsters such as Okuplok Map (oku2v31.wad) or Holy Hell Revealed (Doom 2 - Holy Hell Revealed v1.5 SD.wad) alt fire of Vindicator and Borsch become so slow that they are practically unusable. However slaughter maps are maps where Russian Overkill shines the best so it needs to be fixed.

The problem lies within use of A_SuperExplode. Ro_SuperExploder is a function that iterates over all actors and damages all monsters within your blast radius. However superweapons call this function hundreds of times. So if you have 50k actors and Vindicator does about 300 times during one altfire explosion then it means that this while loop in this code has to process 12M actors. The damage is dynamically calculated by the code max(0, (1 - diff_len / radius) * damage) which can return value of 0 if monster is outside of blast radius. After that mo.DamageMobj gets called regardless of max(0, (1 - diff_len / radius) * damage) result. This means that when you alt fire Vindicator in map Doom 2 - Holy Hell Revealed v1.5 SD.wad at the place where you initially spawn in map it does about 9 million calls to mo.DamageMobj however only about 8.8k of those 9m are actually dealing more damage than 0. This is very inefficient and slows PC down a lot. I did not make up these numbers myself. I got this information by actually measuring the amount of calls using a_log and sending it's output to text file where I could later count the number of certain log entries. So my first proposal is to change A_SuperExplode so that it would only call DamageMobj when damage is > 0.

The code for the fix is following:

Code: Select all

			if(damage_dealt > 0){
				mo.DamageMobj(
					user,
					user.target,
					damage_dealt,
					damage_type);
			}
This alone already greatly speeds up all superweapon alt fires. However there is more that can be done to speed up RO in slaughter maps. Vindicator and Borsch do excessive amount of calls to A_SuperExplode. which means that even if previous fix decides not to damage monsters we still experience some slow down due to A_SuperExplode having to iterate over all actors for hundreds of times. I suggest to call it less times and compensate it with more damage output. This way those weapons still do the same amount of damage but wont use as much CPU time.

In Vindicator\Projectile.rxt find VindicatorMegadeath replace it with:

Code: Select all

Actor VindicatorMegadeath : Ro_SuperExploder
{
	//ReactionTime 200
	+NOINTERACTION
	+FORCERADIUSDMG
	var int user_blasttime;
	var int user_blastratio;
	var int user_blastpower;
	States
	{
	Spawn:
		TNT1 A 0 NoDelay { user_blasttime = 199; user_blastratio = 0; user_blastpower = 0; }
		TNT1 A 2 {
			if(user_blasttime % 3 == 0){
				A_SuperExplode(18000, 384, "Superweapon", 0.1, true);
			}
			user_blasttime--;
			Return A_JumpIf(user_blasttime <= 0,1);
		}
		Wait
		TNT1 A 0 { user_blasttime = 35; }
		TNT1 A 2 {
			user_blastratio += random(96,110);
			user_blastpower -= 100;
			user_blasttime--;
			if(user_blasttime % 3 == 0){
				A_SuperExplode(21000-user_blastpower, 384+user_blastratio, "Superweapon", 0.1, true);
			}
			Return A_JumpIf(user_blasttime <= 0,"Null");
		}
		Wait
	}
}
Compared to original code both calls to A_SuperExplode are wrapped inside if(user_blasttime % 3 == 0){ which basically tells to cause damage only every 3rd iteration. Since I did not change user_blasttime the animation is not 3 times shorter. It still lasts the same amount of time but does 3 times less calls to A_SuperExplode during that time. In A_SuperExplode call I multiplied damage by 3 in order to compensate for 3 times less calls.

Next, take Borsch\Projectile.txt and find BorschHoleDamager and replace it with this:

Code: Select all

Actor BorschHoleDamager : Ro_SuperExploder
{ 
	ReactionTime 120
	+FORCERADIUSDMG
    +NODAMAGETHRUST
	+NOINTERACTION
	DamageType "Superweapon"
	States 
	{ 
	Spawn: 
		TNT1 A 3 NoDelay {
			//A_Explode(8000,512,1,1,512);
			A_Explode(12000, 512); // The kind of blast that kills.
			A_SuperExplode(12000, 512, "Superweapon", 0.1, false);
			A_SetAngle(Angle + 15);
			A_Countdown;
		}
		Loop
	Death:
		TNT1 A 0
		Stop
	} 
}
Here I reduced ReactionTime 3 times and increased one frame duration 3 times with TNT1 A 3 NoDelay. As a result animation lasts the same amount of time but does 3 times less calls to A_Explode and A_SuperExplode. To compensate for damage loss I also multiplied damage by 3 in those calls.


I also created zip file that contains those 3 tiles that I fixed so you dont have to manually edit everything, it's done for you. It only contains the fix itself, it is not a full standalone mode. You need to add those files into RO pk3 file. I do not recommend distributing it as separate file as it creates unnecessary confusion and gets lost over time. Add it to RO.pk3 and then distribute update RO.pk3 instead.

To see the difference load RO with Doom 2 - Holy Hell Revealed v1.5 SD.wad and and alt fire both Vindicator and Borsch with and without this fix. I suggest doing it in room where you spawn initially because it has only 1 monster and therefore you cant blame the slowness on amount of monsters on screen. Also note that both of these explosions are also demanding on graphics card so if animations cause lag with your computer (which can happen due to intel graphics card not being good with translucency) turn your face to opposite direction. Just do something that allows you to estimate the lag. I for example simply used to play around with free look by moving mouse. It can definitely be noticed when when frame rate drops to 1 frame per 2 sec.

Re: [Finished] The Russian Overkill - 3.0c

Posted: Sat Mar 20, 2021 12:06 am
by Valken
I am! I love ROK!

Re: [Finished] The Russian Overkill - 3.0c

Posted: Sat Mar 20, 2021 6:58 am
by PillowBlaster
Re: Superexplosion problem, as that post disappeared for some reason (I saw it, was just too fukken tired to read coherently and respond yesterday) - it will be addressed, I definitely used that function a little too uhhhh, leniently, compared to doctor's orders.

Re: [Finished] The Russian Overkill - 3.0c

Posted: Sat Mar 20, 2021 9:42 am
by zdusr
Hi!

Now the post is back. I am new user here and editing post sent it back to approval queue. Hopefully that post gives you good amount of information on the issue and for testing the fix.

Re: [Finished] The Russian Overkill - 3.0d

Posted: Fri Apr 30, 2021 2:41 pm
by PillowBlaster
Morning. Evening. On a round Earth, its always sunshine somewhere. And same goes for RO, so have an update!
Spoiler: chang-log

Re: [Finished] The Russian Overkill - 3.0d

Posted: Fri Apr 30, 2021 10:28 pm
by Valken
Glorious!

Re: [Finished] The Russian Overkill - 3.0d

Posted: Sat May 01, 2021 10:38 am
by Ac!d
Found a bug : I've die with the "Ullapool Caber" and the weapon didn't switch out and I can still swing the Stielhandgranates in both hands.

Re: [Finished] The Russian Overkill - 3.0d

Posted: Sun May 09, 2021 7:49 am
by zdusr
Hi I looked current release.

In my post above viewtopic.php?f=43&t=29915&start=1740#p1184589 I suggested adding if statement (if(damage_dealt > 0){) around mo.DamageMobj call in A_SuperExplode. I see that is not yet done. Any plans to implement this? Dealing 0 damage to monsters who are outside of blast radius does not do anything useful but it still consumes CPU time. And if you have like 41k monsters in your map then it will be very noticeable.

Re: [Finished] The Russian Overkill - 3.0d mod not working

Posted: Sun May 16, 2021 12:05 pm
by Ushankaboi_771
hi i wwanted to play Russian Overkill but for some reason when i load the mod it is just normal doom.
is that normal ?
how can i fix it

Re: [Finished] The Russian Overkill - 3.0d mod not working

Posted: Sun May 16, 2021 12:16 pm
by wildweasel
Ushankaboi_771 wrote:hi i wwanted to play Russian Overkill but for some reason when i load the mod it is just normal doom.
is that normal ?
how can i fix it
How are you loading it?

Re: [Finished] The Russian Overkill - 3.0d mod not working

Posted: Sun May 16, 2021 1:09 pm
by Captain J
Ushankaboi_771 wrote:hi i wwanted to play Russian Overkill but for some reason when i load the mod it is just normal doom.
That kinda gives me a hint... Have you unzipped the file after downloading it?

Re: [Finished] The Russian Overkill - 3.0d mod not working

Posted: Sun May 16, 2021 6:13 pm
by Ushankaboi_771
wildweasel wrote:
Ushankaboi_771 wrote:hi i wwanted to play Russian Overkill but for some reason when i load the mod it is just normal doom.
is that normal ?
how can i fix it
How are you loading it?
by dragging the mod into GZdoom

Re: [Finished] The Russian Overkill - 3.0d

Posted: Mon May 17, 2021 8:05 am
by 4zm0d4n666
Tried running the most recent Russian Overkill update (3.0d) on Delta-Touch, GZdoom 3.8.2 and LZdoom, and here's what shows up. The menu is working but if I try to do anything it goes back to the console. The previous versions (also 3.0) worked fine when I played on Delta-Touch, is this version not compatible with old GZdoom anymore? :(

Re: [Finished] The Russian Overkill - 3.0d

Posted: Sat Jul 17, 2021 1:32 am
by SaveTheDoomer
I got a similar issue on the latest gzdoom compiled from git, and a crash when the menu is opened, too. Deleting the titlemap.wad from /maps within the pk3 seems to be a workaround.