Smooth Weapons Enhanced [v3.2.1]

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are only for 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.
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by Nash »

Update on Pistol situation:

Using PerK's original state table waaaaay back from 2013 - https://www.doomworld.com/forum/topic/4 ... nt=1145287 - seems to make the Pistol look and feel like vanilla, with animation and sounds in sync.
User avatar
NightFright
Spotlight Team
Posts: 1373
Joined: Fri May 02, 2008 12:29 pm
Location: Germany

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by NightFright »

Maybe I will take that for another attempt to create a version with fast switching.

Anyway, my plan for a last ultimate version was to also be able to choose 100% vanilla (unsmoothed) weapons and vanilla weapons with fast switching. Nevander had released a project doing that and I made some improvements to that recently. Then the mod should really have something for everyone.
macius
Posts: 6
Joined: Sun Jan 06, 2019 2:20 pm

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by macius »

Any plans to add bullet casings? As an option maybe to not rage purists :P
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by Nash »

Sure, we can add bullet casings... then add smooth projectile explosions... then smooth monster projectile explosions... then... oh wait, isn't this becoming Smooth Doom? :P
User avatar
Slax
... in rememberance ...
Posts: 2121
Joined: Tue Oct 19, 2010 7:01 am
Location: Window office.

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by Slax »

I wanna try the ZScript one.
User avatar
NightFright
Spotlight Team
Posts: 1373
Joined: Fri May 02, 2008 12:29 pm
Location: Germany

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by NightFright »

I also think there is little need to add any additional functions. Right now it's about restoring/verifying 100% vanilla firing behavior.
User avatar
Armaetus
Posts: 1256
Joined: Fri Mar 13, 2009 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10 Home
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: New York State

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by Armaetus »

Looking forward to the next release.
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by Nash »



I decided to compare fire-repeat speeds of unmodded VS this mod v2.0 (not my ZScript conversion) using audio. Two separate recording sessions. I would hold down the Fire button for every weapon, and then in the audio editor, I would place both recordings to start at the EXACT same spot.

Mod setting is Smooth Player class.

My method of placing the clips is at maximum zoom and at the sample level, so both recordings start PRECISELY at the same spot, with sample-level accuracy. You can't possibly get more precise than that. To further confirm that both recordings are sample-precise, I would flip the phase of one of the recordings - upon doing this, the audio became completely silent due to phase cancellation - therefore confirming that the start times of both recordings were 100% identical.

Phase cancellation is a common technique in audio engineering to check if two pieces of audio are 100% identical.

Here are my findings:

Code: Select all

Umodded VS PerK Smooth Weapons Enhanced 2.0 (DECORATE version, smooth player class)

Weapon repeat rate comparison

[Identical means 100% accurate to vanilla speeds]

Fist: Identical
Pistol: Too slow
Shotgun: Too fast
Super shotgun: reload clicks too close apart, refire too late
Chaingun: Identical
Rocket Launcher: Too fast
Plasma Rifle: Identical
BFG9000: Identical
Here's a visual explanation of the super shotgun:



Conclusion: while my findings aren't exactly helpful because I basically provide no data that would translate to the state tick durations you'd need, what I can at least confirm is that yes, there are differences, and I have rough estimations of the differences (whether something is too early or too late) - this is much more useful than "uhhh I think there's differences, maybe" - the waveforms here do confirm that YES, there are differences. :)

And I have at least narrowed down which of the weapons actually need work.
Last edited by Nash on Tue Jul 16, 2019 5:19 pm, edited 1 time in total.
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by Nash »

Hey, it's me again. :P

After a few hours of work, and with audio waveform checking as explained in the previous post, I have fixed all of the weapons' state durations to last exactly like they do in vanilla/unmodded.

Every weapon now behaves exactly like they did in vanilla.

ALSO, I fixed a bug with the plasma rifle. In v2.0 of your mod, holding down the plasma rifle fire and then releasing the button immediately would create 3 shots. In vanilla, it would only create 2. I have fixed this so now it behaves exactly like vanilla.

I have also added some extra features which I personally am interested in. Here is currently a full list of differences between PerK's Smooth Weapons Enhanced v2.0, and my version:

- Fully converted to ZScript. Among the benefits of this include no duplicate states and less code spaghetti as decision-making is a LOT easier to do in ZScript.
- No more player classes. Another benefit of ZScript is I am now able to change the weapon sprites on-the-fly with relative ease.
- Options menu added to toggle the following features: black gloves, left/right-handedness for the pistol and fist (new!), gloveless fist like in vanilla (new!), fast weapon switching, more responsive firing, smooth projectile explosion (rocket and BFG)
- All weapons have been re-timed to be exactly like in vanilla. Precision-checked by comparing sound wave forms. All bugs and differences are fixed (SSG too fast, plasma rifle 3-shot bug, etc), the weapons are now vanilla-accurate.

One final note is, unfortunately I feel like adding unsmoothed weapons kind of defeats the purpose of the mod and it will make the code a little bloated (both DECORATE or ZScript even), so I don't think I will be adding that in. People who want unsmoothed weapons should probably play without mods...

At this point, I feel like my little mod of your mod is feature-complete, it has everything that I personally would want it to have. I am just waiting for you to give the OK to release it. :)
User avatar
NightFright
Spotlight Team
Posts: 1373
Joined: Fri May 02, 2008 12:29 pm
Location: Germany

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by NightFright »

Looks like you have done everything that was on my to-do list. Great and thorough analysis of the flawed weapons. Cheers, mate!

However, as I had mentioned before, I am currently on vacation and unable to access any computer to check this out. I'd like to take at least a look before publishing this, especially since it would most likely be the final version. I won't be back before July 29 and I am not sure if you guys can hold on for that long. I would still highly appreciate it if you did.
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by Nash »

NightFright wrote:Looks like you have done everything that was on my to-do list. Great and thorough analysis of the flawed weapons. Cheers, mate!

However, as I had mentioned before, I am currently on vacation and unable to access any computer to check this out. I'd like to take at least a look before publishing this, especially since it would most likely be the final version. I won't be back before July 29 and I am not sure if you guys can hold on for that long. I would still highly appreciate it if you did.
No problem; I'm not in a rush to release anything. Actually, now I have just discovered a problem... my stuff breaks horribly with sv_fastweapons. :P I'm not sure how to fix this yet. Might take a while...
User avatar
NightFright
Spotlight Team
Posts: 1373
Joined: Fri May 02, 2008 12:29 pm
Location: Germany

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by NightFright »

Update:
I will be back on July 29, so if you have found a solution to the sv_fastweapons problem, you can send me a PM with a link to your adjusted version till then. I would probably not make any adjustments if it's just a conversion to zscript plus fixes for weapons fire.
Last edited by NightFright on Wed Jul 24, 2019 12:47 pm, edited 1 time in total.
User avatar
StroggVorbis
Posts: 866
Joined: Wed Nov 08, 2017 4:23 pm
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by StroggVorbis »

@Nash

I don't know about sv_fastweapons, but PowerDoubleFiringSpeed works by dividing every frame's tic duration by 2, with the minimum being a duration of 1, to avoid locking up the engine I presume. For instance, the aforementioned powerup has a greater effect on vanilla weapons than Smooth Doom's, even though both (should) have the same total tic duration.

Edit: Tested v2.0 with PowerDoubleFiringSpeed and sv_fastweapons 1. The pistol, when compared to vanilla, is sped up, but not as fast. The smooth chaingun is not affected at all in both cases. When using the fast switch classes, the weapons take the default time to lower and raise instead of double and they constantly flicker while doing so.
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by Nash »

No worries everyone, I fixed everything and have been playing this since I last posted. I think I'm pretty much done, although I'd probably want to fine-tweak the animation for the shotgun and super shotgun a little more, I feel like it's still kinda not quite there yet. As in, the total tics last the same as vanilla, but the animation speeds could be fine-tuned to look better.

NightFright, I will send you a PM to my mod. I have a feeling it may have grown a little too big though... I don't know, you be the judge.
User avatar
NightFright
Spotlight Team
Posts: 1373
Joined: Fri May 02, 2008 12:29 pm
Location: Germany

Re: PerK's Smooth Weapons Enhanced [v2.0 out NOW]

Post by NightFright »

Grand. Btw, if you feel like zscripting my adaptation of DTD's fullscreen statusbar (the one with splitscreen mode) - if it's even possible and a conversion makes any sense at all -, feel free to do so. It's quite finished and I wouldn't know how to improve it any further except for dropping the sbarinfo approach. I really need to get into zscripting by myself one of these days.

One way or the other, even w/o having seen the results yet, your assistance in getting this fully fixed is highly appreciated.

Return to “Gameplay Mods”