Slaughter Map Performance Booster
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.
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.
-
- Posts: 13780
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Slaughter Map Performance Booster
Slaughter Map Performance Booster
The idea is simple - this prevents monsters from running tics too often when they are out of range. Instead of doing their A_Look/A_Chase calls every tic, they do it every X tics (as you define in the menu), if they are too far out of range to really matter. The result is a huge boost in FPS (particularly with heavy slaughter maps like Sunder MAP11).
Yes - you may use this in projects - just keep in mind I have not tested what happens if someone else happens to do so too.
There is a menu for fine tuning.
Special thanks to everyone who's ever written ZScript wikis and tutorials over the years, and particularly to Ed the Bat who helped me figure out the compiler errors while I was making this.
Depending on how you set the settings - this *will* affect how maps play - monsters that are slowed and out of range are significantly less aggressive - this can affect maps that abuse chaingunners, for example, for long-range LOS punishment. (i.e. Plutonia maps) - there's an option to help mitigate this but it does not ultimately fix it - the behavior of slowed monsters will inevitably be changed no matter what.
Repo: https://github.com/madame-rachelle/Slau ... nceBooster
Download: https://github.com/madame-rachelle/Slau ... b-v1.2.pk3
The idea is simple - this prevents monsters from running tics too often when they are out of range. Instead of doing their A_Look/A_Chase calls every tic, they do it every X tics (as you define in the menu), if they are too far out of range to really matter. The result is a huge boost in FPS (particularly with heavy slaughter maps like Sunder MAP11).
Yes - you may use this in projects - just keep in mind I have not tested what happens if someone else happens to do so too.
There is a menu for fine tuning.
Special thanks to everyone who's ever written ZScript wikis and tutorials over the years, and particularly to Ed the Bat who helped me figure out the compiler errors while I was making this.
Depending on how you set the settings - this *will* affect how maps play - monsters that are slowed and out of range are significantly less aggressive - this can affect maps that abuse chaingunners, for example, for long-range LOS punishment. (i.e. Plutonia maps) - there's an option to help mitigate this but it does not ultimately fix it - the behavior of slowed monsters will inevitably be changed no matter what.
Repo: https://github.com/madame-rachelle/Slau ... nceBooster
Download: https://github.com/madame-rachelle/Slau ... b-v1.2.pk3
Last edited by Rachael on Sat Jun 08, 2024 3:51 pm, edited 1 time in total.
-
-
- Posts: 17462
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Slaughter Map Performance Booster
Definitely saving this one for my reference. :) Thanks!
-
- 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
Re: Slaughter Map Performance Booster
As a "good scripting practice" recommendation there I'd suggest that you cache the thinker iterator and re-init it, instead of re-creating it every tic. This is going to thrash the GC otherwise.
-
- Posts: 13780
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Slaughter Map Performance Booster
Thank you - it is actually quite rare that anyone gives me helpful feedback like this on one of my scripting projects. I appreciate it.
-
- Posts: 13780
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Slaughter Map Performance Booster
Haven't touched it for almost 24 hours, it's probably stable enough for a v1.0 release. It's a fairly lightweight project anyway.
-
- Spotlight Team
- Posts: 1089
- Joined: Mon Nov 25, 2019 8:54 am
- Graphics Processor: Intel (Modern GZDoom)
Re: Slaughter Map Performance Booster
A reason why the best ideas are simple by heart - Sadly i am not techncially proficient enough to provide meaningful feedback, but this is very beneficial.
Consider this looks at monster count and not line count, question: Would Planisphere 2 or The Given be benefitted from this? Both maps are use a ton of lines to cause their slowdowns, but,afaik, Planisphere 2 also has quite a lot of monsters. I figure the performance boost will be less.
Consider this looks at monster count and not line count, question: Would Planisphere 2 or The Given be benefitted from this? Both maps are use a ton of lines to cause their slowdowns, but,afaik, Planisphere 2 also has quite a lot of monsters. I figure the performance boost will be less.
-
- Admin
- Posts: 6190
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
Re: Slaughter Map Performance Booster
Only thing to do is test. Some maps the slowdowns come from monsters, some maps from geometry, some maps it comes from both.
This improves performance by reducing the tic rate for monsters far away from the player. It won't do anything to help with slowdowns related to map geometry processing.
This improves performance by reducing the tic rate for monsters far away from the player. It won't do anything to help with slowdowns related to map geometry processing.
-
- Posts: 13780
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Slaughter Map Performance Booster
It also has menu tweaks available too. If the map is giant and has a lot of wide open spaces then you'll want to widen the radius from which monsters get slowed - if the map has a lot of twisty turny corners you can get away with bringing that down without having a noticeable affect on gameplay and that will have a bigger boost.
Also Cali is right - this will do nothing if the slowdown problems are related to map geometry or other rendering issues.
Admittedly my supply of slow computers to test this on is fairly slim. I tested this on my somewhat modern and decently performant computer and was able to push some of Sunder's worst maps from being playable to feeling smooth. This computer simply doesn't choke on Sunder's maps even without this addon - I've tried. So, I don't know exactly every way how this will affect slower computers.
If there's a better map set to test (that is *NOT* Nuts.wad) - I would be happy to give this a shot. Anything with between 5,000 to 20,000 is a good candidate.
I haven't tried Speed of Doom yet with this mod, so I will give that one a shot.
edit: Turns out that while SOD has slaughter maps, they aren't in the counts Sunder was. The map with the biggest monster population was MAP28 which totaled at nearly 3k, not enough to slow down my computer.
Also Cali is right - this will do nothing if the slowdown problems are related to map geometry or other rendering issues.
Admittedly my supply of slow computers to test this on is fairly slim. I tested this on my somewhat modern and decently performant computer and was able to push some of Sunder's worst maps from being playable to feeling smooth. This computer simply doesn't choke on Sunder's maps even without this addon - I've tried. So, I don't know exactly every way how this will affect slower computers.
If there's a better map set to test (that is *NOT* Nuts.wad) - I would be happy to give this a shot. Anything with between 5,000 to 20,000 is a good candidate.
I haven't tried Speed of Doom yet with this mod, so I will give that one a shot.
edit: Turns out that while SOD has slaughter maps, they aren't in the counts Sunder was. The map with the biggest monster population was MAP28 which totaled at nearly 3k, not enough to slow down my computer.
-
- Posts: 118
- Joined: Sat Mar 27, 2021 3:21 pm
Re: Slaughter Map Performance Booster
what are your specs?
-
- Posts: 475
- Joined: Sun Mar 21, 2021 9:40 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): linux mint 21
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Slaughter Map Performance Booster
I tested this on Planisphere 2 on GZD 4.8.2 and its a mixed review mainly for that map. The Good News is yes it does work, but the bad news is that a lot of it it is from map geometry for a lag. To get the most amount of smoothness I had to use Polysoft render or GLES using Doom Software render, using Lowest Possible Scale setting, and a scale factor of 0.25, VSync on but render interpolation turned off.
But Yes, SMPB does have a noticeable and working effect when comparing it with or without the mod.
Heres the machine specs roughly speaking
But Yes, SMPB does have a noticeable and working effect when comparing it with or without the mod.
Heres the machine specs roughly speaking
Code: Select all
CPU: Topology: Dual Core model: AMD E1-1200 APU with Radeon HD Graphics bits: 64 type: MCP
arch: Bobcat L2 cache: 512 KiB
flags: lm nx pae sse sse2 sse3 sse4a ssse3 svm bogomips: 5590
Speed: 825 MHz min/max: 777/1400 MHz Core speeds (MHz): 1: 1032 2: 880
Graphics: Device-1: AMD Wrestler [Radeon HD 7310] vendor: Acer Incorporated ALI driver: radeon
v: kernel bus ID: 00:01.0 chip ID: 1002:9809
Display: x11 server: X.Org 1.20.13 driver: ati,radeon unloaded: fbdev,modesetting,vesa
resolution: 1600x900~60Hz
OpenGL: renderer: AMD PALM (DRM 2.50.0 / 5.4.0-109-generic LLVM 12.0.0)
v: 3.3 Mesa 21.2.6 compat-v: 3.1 direct render: Yes
Audio: Device-1: AMD Wrestler HDMI Audio vendor: Acer Incorporated ALI driver: snd_hda_intel
v: kernel bus ID: 00:01.1 chip ID: 1002:1314
-
- Posts: 13780
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Slaughter Map Performance Booster
Tried with SF2012 on MAP27 with 10k monsters - still couldn't get it to choke.
Then tried SF2011 on MAP30 with 15k monsters - finally managed to get my system down to 3 FPS.
There was a huge boost enabling the mod after that, went up to about 64 FPS or so with the mod enabled.
Then tried SF2011 on MAP30 with 15k monsters - finally managed to get my system down to 3 FPS.
There was a huge boost enabling the mod after that, went up to about 64 FPS or so with the mod enabled.
My specs are AMD Ryzen 7 3800X Octa-core @ 3.89 GHz, with 32 gb ram, nvidia gtx 1650.Delfino Furioso wrote:what are your specs?
Thank you - this is what I was hoping for.kalensar wrote:But Yes, SMPB does have a noticeable and working effect when comparing it with or without the mod.
-
- Posts: 150
- Joined: Mon Jan 21, 2019 10:10 am
Re: Slaughter Map Performance Booster
This is fantastic. Any chance you can make this work on LZDoom also? It seems to almost work as is, other then a thinker error on death
-
- Posts: 173
- Joined: Sun Sep 01, 2019 10:59 am
Re: Slaughter Map Performance Booster
Not at my computer right now, so I dont have the exact error message, but I ran into an issue with this and maps that use the SpecialSpot actors, specifically when reloading a saved game, gzdoom crashes quoting a line in the gzdoom.pk3. It can be reproduced by loading up Doom 2 and heading to map 30 and saving. When you try to load the save, it starts throwing errors. What baffles me is why its happening, as I don't see anything in the code that would cause it to happen. If you need the exact error, I'll post it next time I'm at my computer. For reference on how I ran into this problem, I was playing map with all of Doom 2s levels mashed into a single map, with a bunch of gameplay mods that really slowed things down, and this mod helped a lot, but when I reloaded my save, the error popped up.
-
- Posts: 13780
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Slaughter Map Performance Booster
Yes - I need the exact error please, along with direct links to what mods you are using. I really would like to fix this if I can.stainedofmind wrote: ↑Mon Aug 15, 2022 2:08 pm Not at my computer right now, so I dont have the exact error message, but I ran into an issue with this and maps that use the SpecialSpot actors, specifically when reloading a saved game, gzdoom crashes quoting a line in the gzdoom.pk3. It can be reproduced by loading up Doom 2 and heading to map 30 and saving. When you try to load the save, it starts throwing errors. What baffles me is why its happening, as I don't see anything in the code that would cause it to happen. If you need the exact error, I'll post it next time I'm at my computer. For reference on how I ran into this problem, I was playing map with all of Doom 2s levels mashed into a single map, with a bunch of gameplay mods that really slowed things down, and this mod helped a lot, but when I reloaded my save, the error popped up.
I will take a shot at it later when I get some time.
-
- Posts: 173
- Joined: Sun Sep 01, 2019 10:59 am
Re: Slaughter Map Performance Booster
Can do. Not going to be at my computer again until tomorrow evening, but the error occurred even with just Doom 2 and your mod loaded by themselves.