FPS problem related to function ScriptProcess

Started by Kenneth Law, Apr 11, 2019, 04:33 AM

Previous topic - Next topic

Kenneth Law

I used ScriptProcess in client side for 3D GUI label display but there seemed to be a serious frame issue after this was added.
I wrote some codes for transforming the 3D position of the world into screen position and moving the labels to the position accordingly into ScriptProcess and found that this function which performs callback per frame would lead to a frame skipping, especially when there were too many lines included in the event.
This has been tested for lots of times by making a comparison between the two situations in which I reserved and removed the ScriptProcess.
An evident distinction in frame rate was proved existing between them.
So is there anything wrong with the codes in client script being processed each frame since the frame rate looks unstable and low while they do so?

DizzasTeR

You most likely did a mistake of instantiating instances of gui elements rather than just modifying their characteristics, I have a alot, and I mean alot of things under script process and if done right, everything is smooth and nice

Xmair

Possibly adding to this topic, such frame skips sometimes occur when there is an error and that error is being written to your debug log each frame, causing the frame skips.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD