Author Topic: Wrench Events (SpaceGuy's Version) Lag  (Read 1429 times)

Hey, this is sort of a follow up on my other thread regarding disappearing lights. Since we came to the conclusion that we cannot do anything about lights disappearing, then I obviously need to make more of them. Thus leading to more lag from Wrench Events. Does anyone know of a way to reduce the lag Wrench Events produces?

Any help and I will be eternally grateful XD

Thanks

Any events that come from 'touching' the brick can cause lag, such as Hurt, Emotes and the Touch Wait For/Triggers events.

I had discovered that the way lights turn on was very inefficient (through finding the datablock every time the event is called) and have a less laggy version, in my current beta. This will hopefully be released soon.

Also, having lights in general can lag the server anyway, without Wrench Events. Rendering many lights on-screen at once causes lots of raycast and other calculations, creating lag for clients and possibly the server if it is a non-dedicated server.

If you do want to render more lights on-screen (not recommended, may cause extreme lag), clients can use this code in their console to change it. 32 is the maximum amount of texture lights you can set with the in-game slider. 8 is the maximum amount of hardware lights, but I think that is for rendering the scene so you can't have 16 suns or whatever.

Code: [Select]
$pref::OpenGL::maxDynLights = "32";
$pref::OpenGL::maxHardwareLights = "8";
« Last Edit: March 15, 2008, 04:12:36 AM by Space Guy »

So Wait For is probably causing the majority of the lag? Because it is laggy even when no events are being triggered at the time (ie. nobody is using any events) and when there are none that are looping.

Thanks

Yeah, I'd assume it still check for if it's being triggered.