Many monsters: why is GZdoom so much slower than Zdoom?

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
User avatar
Caleb13
Posts: 325
Joined: Wed Jun 30, 2010 2:58 pm

Many monsters: why is GZdoom so much slower than Zdoom?

Post by Caleb13 »

Someone decided to "revive" the infamous Nuts WAD at Doomworld and I gave it a try in GZdoom 4.2.4. But it was very slow (30 fps or less) when all the monsters in the first room woke up, even though I played on Threadripper 1950 with GeForce 1070 Ti. And It stayed slow even when all the monsters were dead and I looked only at their corpses (if I looked into a wall, framerate came back up to my monitor's 85 fps/Hz cap as expected). What's even weirder, the framerate significantly increased when I picked up invulnerability spheres (greyscale palette), regardless on whether the monsters lived or not. What causes this behavior?

I'm asking because when I played original Nuts some 10 years ago in Zdoom, I had no such problems, even though I had much slower machine back then. And when I tested the map in Zdoom 2.7.2 today, it also run smoothly. I tried disabling dynamic lights and other advanced GZdoom features, but it just doesn't run nowhere as smoothly as Zdoom. Are there some settings that would take GZdoom closer to Zdoom speed, at least when many monsters are concerned? Thanks.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Many monsters: why is GZdoom so much slower than Zdoom?

Post by Graf Zahl »

Nuts hits several edge cases in the engine, some inherited from ZDoom and some imposed by the renderer. Here's the ones I know:

Nuts is a map on which dynamic lights absolutely murder performance, there's simply too much going on.
Rendering sprites is far more expensive than rendering walls or floors. And Nuts got thousands of them. A lot of this is caused by some feature additions that ultimately didn't bring anything of value and probably need to be refactored out into a compatibility handler.
At some point in the past ZDoom changed how the blockmap is used to link monsters. This new method is more precise but also requires more performance.

With invulnerability things get faster for a simple reason: The engine does not perform any lighting calculations, it just renders a fullbright image. Since you are already severely bottlenecked, this omission can be experienced as a frame rate increase because any instruction less executed translates directly into lower frame rate.
Post Reply

Return to “General”