pa1nki113r / Project_Brutality

This is the primary repository for collaborative efforts between Doom developers on Project Brutality. This is the bleeding-edge version that is constantly being developed on, and not meant in any way shape or form to be representative of the final version of the mod.
1.17k stars 403 forks source link

Idle enemies are extremely performance-heavy #644

Open tunbridgep opened 3 years ago

tunbridgep commented 3 years ago

It's possible that nothing will ever be able to really be done about this, but it seems that maps with 800+ enemies really slow the engine to a crawl, regardless of how many are actually active and regardless of how powerful ones computer is.

Unfortunately, this is becoming a major issue as more and more modern mapsets are frequently including more and more enemies, and it's making them unplayable in Project Brutality.

For reference, launch Lullaby or any other high-end cacoward map from the last 2 years. The game will run at 5-10 FPS maximum and will be completely unplayable.

Could someone investigate a way to potentially make idle enemies more efficient?

D3X1KAXYZ commented 3 years ago

This is unfortunately normal, especially for pb, which for every enemy there are 1-5 other actors that handle hit detection. So your 800 actors end up becoming closer to 4000. There may be some minor optimization, but even then, there are the potential bottlenecks with hardware and the source ports that we cant really mitigate.

JMartinezHarmoniousPerson commented 3 years ago

This is one of the reasons why we're converting all monsters, decorations and other effects to ZScript. 1000 ZScripted monsters has less performance impact compared to the original Decorate monsters.

popguy12 commented 2 years ago

i do want to bring up that back in like, GZ 4.1.3 or so, when the zombiemen got overhauled, PA1N wrote the new hitbox spawning system, which dynamically spawns them based on whether the actor is in the players LOS, it worked wonders back then, but around GZ 4.5 or so, something changed engine side that ruined this whole system

popguy12 commented 7 months ago

this should hopefully have better performance now, especially with the hit detection improvements, but its still something to keep in mind for the future