Slowness with many actors and possible mitigations
- Kinsie
- Posts: 7399
- Joined: Fri Oct 22, 2004 9:22 am
- Graphics Processor: nVidia with Vulkan support
- Location: MAP33
- Contact:
Re: Slowness with many actors and possible mitigations
GZDoom is powerful and amazing and my friend, but it's still Doom under the surface and for some things you need to work with that in mind, otherwise you're basically going to spend all of your time trying to smash square-shaped pegs into round-shaped holes and getting frustrated.
Re: Slowness with many actors and possible mitigations
Yes, you're wrong. GZDoom is meant to, and will always be a Doom engine. At some point, a line is drawn.Apeirogon wrote: Or Im wrong and gdoom dont move to/cross "free game engine" line?
You want something more, you should consider Unity or Unreal Engine 4. :)
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Slowness with many actors and possible mitigations
... and you can take that quite literally, considering how the engine performs collision detection of actors...Kinsie wrote:otherwise you're basically going to spend all of your time trying to smash square-shaped pegs into round-shaped holes and getting frustrated.
Re: Slowness with many actors and possible mitigations
Nash wrote:Yes, you're wrong. GZDoom is meant to, and will always be a Doom engine. At some point, a line is drawn.Apeirogon wrote: Or Im wrong and gdoom dont move to/cross "free game engine" line?
You want something more, you should consider Unity or Unreal Engine 4.
If you thought that Unreal/Unity dont have some silly restrictions, your wrong. I dont touch it at all, but from my experience from working with other "home made" game engine, (serious sam/dawn of war/half life/disciples/HoMM/etc. engine) Im sure that it have some. But thanks to programmers from Epic/Unity it it contains very few of such restrictions. Most famous "free" game engine after all.Kinsie wrote:GZDoom is powerful and amazing and my friend, but it's still Doom under the surface and for some things you need to work with that in mind, otherwise you're basically going to spend all of your time trying to smash square-shaped pegs into round-shaped holes and getting frustrated.
But that question to Marisa, since it only significant person here which know thing or two about it.
What I meant, the only differences of gzdoom from nowadays game engine that it runs only on one core and that the renderer try to render ALL that player POSSIBLE can see, instead if draw all that player ACTUALLY can see. From all other point of view, it generic nowadays game engine, since it have materials, shaders, Vulkan API (in near future), models, can runs in windows 10, etc. Or even more, since it have JIT compiler.
So now gzdoom in position "too far to reach, too low to get up" from the point of game engine, in my opinion.
- Marisa the Magician
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
- Contact:
Re: Slowness with many actors and possible mitigations
Still would like to hear what happened to FPS with lots of things vs. lots of not-rendered things vs. not lots of things.
OP: did you get a chance to test this out?
OP: did you get a chance to test this out?
- Marisa the Magician
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
- Contact:
Re: Slowness with many actors and possible mitigations
Excuse me but in here there are people who know more than me about those engines. I'm only specialized in Unreal Engine 1 and 1.5. You give me too much credit.
And I can tell you that UE1 also has trouble with slowness (or even crashing) caused by too many actors (in fact, slowness tends to happen with actor counts in the hundreds, not thousands). The engine is single threaded, runs at a much higher tick rate (a variable one, even) and it has even more stuff to deal with for just one actor than GZDoom.
And I can tell you that UE1 also has trouble with slowness (or even crashing) caused by too many actors (in fact, slowness tends to happen with actor counts in the hundreds, not thousands). The engine is single threaded, runs at a much higher tick rate (a variable one, even) and it has even more stuff to deal with for just one actor than GZDoom.
-
- Posts: 76
- Joined: Sat Jul 05, 2014 7:38 am
Re: Slowness with many actors and possible mitigations
I'm very certain with actors that don't do much thinking, it's a rendering thing. I did a test with setting bInvisible in batches:gramps wrote:Still would like to hear what happened to FPS with lots of things vs. lots of not-rendered things vs. not lots of things.
OP: did you get a chance to test this out?
I made an actor I call VisLinker* that makes a list of other actors within some radius (filtered by another list I provide) and hides/unhides them depending on distance to nearest player.
Look at this video:
https://my.mixtape.moe/hvjsak.m4v
You should notice two things: FPS going up as I move back, and the groups disappearing in the distance.
I only place the VisLinkers on one side of the map so the difference in FPS could be noticed.
But those are all in view, you may say, well... I've already started using these on a real map where you can't see all these cosmetic actors at once and I've already noticed an improvement on ~20FPS in some areas.
So actors that can not be seen by the player and are within the view frustum are still taking rendering time. Which means GZDoom has no occlusion culling or its implementation isn't that good.
I suppose another way to do this would be to segment your map by hand and turn the actors invisible/visible as the player passes segments, but then that sounds awful similar to what other engines like Doom 3 already do with visportals.
*Latest, slightly different to what is in vid, code if anyone is interested: https://pastebin.com/5pgFLHZ1
Re: Slowness with many actors and possible mitigations
Ah, so the think time was a red herring, and it's rendering causing the slowness as you suspected.
Thanks for following up on this, this is useful stuff to know.
Thanks for following up on this, this is useful stuff to know.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Slowness with many actors and possible mitigations
The big time waster here isn't processing an actor for rendering but hitting a cache miss for most of them. Even for the most trivial of checks the actor's data needs to be read which most likely involves one cache miss. After that all the rest becomes mostly irrelevant. As long as an actor is linked to a sector that gets rendered it needs to be looked at at least once.SuaveSteve wrote: So actors that can not be seen by the player and are within the view frustum are still taking rendering time. Which means GZDoom has no occlusion culling or its implementation isn't that good.