Jump to content

onClientPreRender


mustang

Recommended Posts

is there any other event than "onClientPreRender" or "onClientRender" cause i have a project iam working that needs alot of looping for the same function , for about 33 triggers per second , but i realised that functions depends on rendering , and my server fps limit is 60 and iam worried about people who got low fps like 30 - 40 or lower , they wont have the same result , its something about moving objects without let them teleporting from place to another thats why , i will be moving these object with small values each 3 mili secs(almost) to show smooth movement , i tried to get the client fps and do some math , but its really REALLY hard and takes alot of work .

Link to comment

Well there is setTimer but the minimum time is 50 mili secs not even close to 3.

After all what is so hard to calculate ? You take the current FPS let's say 45 FPS , that is 1 sec (1000 mil sec ) that mean's that the smallest possible trigger is 1000/45 = 22 mili sec, for 3 mili sec you would need 1000/3 = 333 FPS that is not possbile , at 100 FPS (max) you can do a 1000/100 = 10 mili sec trigger.

Link to comment
Well there is setTimer but the minimum time is 50 mili secs not even close to 3.

After all what is so hard to calculate ? You take the current FPS let's say 45 FPS , that is 1 sec (1000 mil sec ) that mean's that the smallest possible trigger is 1000/45 = 22 mili sec, for 3 mili sec you would need 1000/3 = 333 FPS that is not possbile , at 100 FPS (max) you can do a 1000/100 = 10 mili sec trigger.

I solved this problem by getting the coordinates of the object , for example if the object reached the wanted position or higher then stop the loop , anyways thanks , it may take about 400 - 500 mili sec more time for low fps players

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...