MZ Attack skill causes major FPS drop

Hi everybody! (hi dr nick)

My project tends to run at about 60 FPS with minor drops when big animations play or lots of processes run, which I've come to expect. But recently I've noticed something strange: when an actor uses Skill #1, Attack, the FPS drops to a laggy mess of about 5-7 frames per second.

It's even worse if I use any kind of ability that grants an actor multiple attacks at once, such as a weapon with the Attack Times +1 trait. This does not occur with enemies, only player actors.

I've not modified the Attack skill in any way, and I haven't added or modified a plugin in months, so I figure it must be something else? I did read about updating nw-js and pixi so I did that, and while it actually did make other things look and act more smoothly, it sadly did nothing for the attack skill FPS drop.

I've tested this on multiple maps at different Actor levels and with different weapons, Actors, etc. It even happens when I try a battle test with an enemy Troop. The next step is going to be going through and disabling plugins one at a time, which I have started to do, but it seems strange that I've only noticed this recently.

Has anyone had something similar happen? If so, what did you do to fix it?
Check if it's actually running in WebGL; if it's running in Canvas, the animations might drop the FPS. Another possibility is the sound card; try temporarily replacing the animations with copies without sound effects.
But my best guess is that your WebGL support is not enabled or does not exist (software or video driver).
1777933664545.png


Edit:
I performed the following test: upon starting the battle, 100 animations will be executed, followed by a hit on enemy "A" of the troop:
1777934882191.png


Keep in mind that attack animations like these don't wait in a queue; they'll all be executed almost simultaneously. Resut:
1777935303292.png

In other words, you are configuring sound playback incorrectly for your animations. For example, I included dozens of sounds to start in FRAME 1 of the animation:
1777935612646.png

Meaning the native audio API will override and hold back the WebGL animation API, since both consume browser resources (NWjs) and in turn consume your computer's RAM.

For the record, my computer only has 8GB of RAM, no dedicated graphics card for high performance, and Firefox was open, and even then I had to force it with several animations for WebGL to notice the drop in performance.
Oh dang, thanks for such a thorough reply! I'll go through all this once I'm off work, fingers crossed.
side view or front view?
if you're using sideview then the weapon selection and animation adds processing to the attack skill, while other skills usually don't have that part of the animation.
I'm using side view, yea. That is interesting, I didn't think about trying different weapons to see if the problem persists. Adding that to the list of troubleshooting!

Original thread: https://forums.rpgmakerweb.com/threads/attack-skill-causes-major-fps-drop.183495/