Lag reduction script for maps

[Open Assets] Lag reduction script for maps 2

This content may be freely modified and/or maintained by anyone.

pastel

‫‬‭‮‪‫‬‭‮
Katmint submitted a new resource:

Lag reduction script for maps - will not reduce lag from character mods

This lua script reduces lag from maps significantly by deactivating all objects on spawn and only activating them while they're within a certain radius of any player. Objects activated by proximity will deactive a few seconds after the player leaves the radius.

Use the perfstats 2 and ps_samplesize 175 console commands to compare map performance.

Technically works in multiplayer but will have diminishing returns based on player count. Will probably actually...

Read more about this resource...
 
I'm sure this'll change upon changing the distance value in the script but I've apparently stumbled upon the fact that Fang just doesn't leave at the default distance value. My guy just goes down and stays down and ACZ3 can't progress. Which kinda feels weird since I could have sworn I've beat Fang with this script before today, but I made sure I singled in on it when testing which addons caused that and it's definitely this one.
 
I'm sure this'll change upon changing the distance value in the script but I've apparently stumbled upon the fact that Fang just doesn't leave at the default distance value. My guy just goes down and stays down and ACZ3 can't progress. Which kinda feels weird since I could have sworn I've beat Fang with this script before today, but I made sure I singled in on it when testing which addons caused that and it's definitely this one.
I'll probably just exempt bosses from the script entirely when I update it. It's not like they're a problem outside of "I put 500 eggmobiles in this room :twisted:" in which case frame drops were likely part of the intended experience anyways.
 
I'll probably just exempt bosses from the script entirely when I update it. It's not like they're a problem outside of "I put 500 eggmobiles in this room :twisted:" in which case frame drops were likely part of the intended experience anyways.
Fair enough! Especially since another boss is affected in the form of Egg Colosseum, although the pinch phase actually forcing you to run around to go catch Eggman since he stops moving if he actually gets to the other side away from you and starts stalling you out is actually genuinely hilarious, it's probably unintentional behavior as well.
 
I ask that you add this lag reduction script to your addon, to reduce lag by even more; this is from my fully re-usable level pack:
please also add this SOC to your mod, in .lua form:
Code:
State S_PUMA_START1
Var2 = 0

State S_PUMA_UP1
Var2 = 0

State S_PUMA_UP2
Var2 = 0

State S_PUMA_UP3
Var2 = 0

State S_PUMA_DOWN1
Var2 = 0

State S_PUMA_DOWN2
Var2 = 0

State S_PUMA_DOWN3
Var2 = 0
this'll prevent the game from spawning many scenery objects, which'll prevent a bit of lag in some levels(or alotta lag in my lvl pack)
you may opt to not modify S_LAVAFALL_TELL, which'll cause lavafalls to still spawn scenery rocks before they spawn lava
 

Attachments

  • cutcorners.lua
    3.6 KB · Views: 201
I forgot about this mod! Having lag reduced like this is such a godsend!
I actually downloaded the first version and found a bug, but forgot to report it out of nowhere. Now that it was updated, I booted up the game to see if it was a freak accident or not, but turns out it's not.
In Castle Eggman Zone Act 2, everything is as normal except for... Some spike balls on chains, or the end-level chains you're supposed to take to finish the level.
Every other ball chain or grabbable chain works as intended however, so I can't help but wonder why these specifically are borked? Maybe the game treats them as different objects?
srb20013.gif

srb20014.gif
 
Like the above, I've noticed some oddities in CEZ 1 and 2...mostly just the pop up spikes, never pop up (or down) staying in their default state (The bridge at the end of Act one also has this issue, but i forgot to make a gif)

srb20082.gif
 
So I just tried using this script and didn't notice a difference. It should be noted that I was trying it on Speed Highway (a map I've always had insane difficulty with regarding lag). Am I supposed to activate it like an ordinary add-ons, or is it meant to be inserted in map luas, or what? I suppose the problem might be that my laptop is too crummy for the script to have much effect, but I thought I'd ask
 
So I just tried using this script and didn't notice a difference. It should be noted that I was trying it on Speed Highway (a map I've always had insane difficulty with regarding lag). Am I supposed to activate it like an ordinary add-ons, or is it meant to be inserted in map luas, or what? I suppose the problem might be that my laptop is too crummy for the script to have much effect, but I thought I'd ask
i was having this issue too but try switching to software rendering it helped me
also i would like to thank this mod thanks to it im actually getting around 45 - 30 fps now
without this mod im usally around 20 - 30 fps
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top