[Finished] The Russian Overkill - 3.0e

Projects that have specifically been abandoned or considered "dead" get moved here, so people will quit bumping them. If your project has wound up here and it should not be, contact a moderator to have it moved back to the land of the living.
Slugrprod
Posts: 1
Joined: Mon Mar 08, 2021 11:05 am

Re: [Finished] The Russian Overkill - 3.0c

Post by Slugrprod »

hey guys, i made a desktop icon for the mod, i'd like to know if you were interested in using it.
zdusr
Posts: 32
Joined: Fri Mar 19, 2021 12:33 pm

Re: [Finished] The Russian Overkill - 3.0c

Post 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.
You do not have the required permissions to view the files attached to this post.
Valken
Posts: 281
Joined: Mon Jun 08, 2015 7:32 am

Re: [Finished] The Russian Overkill - 3.0c

Post by Valken »

I am! I love ROK!
User avatar
PillowBlaster
Posts: 919
Joined: Sun Jan 24, 2010 2:55 pm

Re: [Finished] The Russian Overkill - 3.0c

Post 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.
zdusr
Posts: 32
Joined: Fri Mar 19, 2021 12:33 pm

Re: [Finished] The Russian Overkill - 3.0c

Post 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.
User avatar
PillowBlaster
Posts: 919
Joined: Sun Jan 24, 2010 2:55 pm

Re: [Finished] The Russian Overkill - 3.0d

Post by PillowBlaster »

Morning. Evening. On a round Earth, its always sunshine somewhere. And same goes for RO, so have an update!
Spoiler: chang-log
Valken
Posts: 281
Joined: Mon Jun 08, 2015 7:32 am

Re: [Finished] The Russian Overkill - 3.0d

Post by Valken »

Glorious!
User avatar
Ac!d
Posts: 346
Joined: Tue Apr 02, 2019 5:13 am
Location: France

Re: [Finished] The Russian Overkill - 3.0d

Post 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.
zdusr
Posts: 32
Joined: Fri Mar 19, 2021 12:33 pm

Re: [Finished] The Russian Overkill - 3.0d

Post 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.
Ushankaboi_771
Posts: 3
Joined: Fri May 14, 2021 3:16 am
Graphics Processor: Not Listed

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

Post 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
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

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

Post 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?
User avatar
Captain J
 
 
Posts: 16891
Joined: Tue Oct 02, 2012 2:20 am
Location: An ancient Escape Shuttle(No longer active here anymore)

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

Post 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?
Ushankaboi_771
Posts: 3
Joined: Fri May 14, 2021 3:16 am
Graphics Processor: Not Listed

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

Post 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
4zm0d4n666
Posts: 5
Joined: Mon May 17, 2021 7:55 am

Re: [Finished] The Russian Overkill - 3.0d

Post 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? :(
You do not have the required permissions to view the files attached to this post.
SaveTheDoomer
Posts: 149
Joined: Sun Apr 11, 2021 4:20 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: [Finished] The Russian Overkill - 3.0d

Post 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.

Return to “Abandoned/Dead Projects”