Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to make LUA Thread/Timer Independent of FPS

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 402

PostPosted: Thu Dec 24, 2020 9:39 am    Post subject: How to make LUA Thread/Timer Independent of FPS Reply with quote

Hi all Merry Christmas and God bless

Is there a way to make lua timer / script run independent of fps - which i doubt but still ask

i used a mod for a game that unlocks its fps to 144 from 60
and this brakes many of my scripts as they run slow and even setting them to 1 wont work

also how i calculate correct Interval per current FPS?

What interval a non-stop working script shall run for 60 FPS ?
Thanks

_________________
I am the forgotten one the dead one.
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 98

Joined: 14 Jul 2007
Posts: 3344

PostPosted: Thu Dec 24, 2020 10:46 am    Post subject: Reply with quote

AFAIK, a LUA timer is not depending on the FPS in the first place.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4724

PostPosted: Thu Dec 24, 2020 1:00 pm    Post subject: Reply with quote

The resolution of timers is limited by that of the system timer, which is generally about 10-16ms. Fine for 60fps (16.6 ms per frame), but not for 144fps (6.9 ms per frame).

It would be best to hook into the game's rendering engine if you need to sync with fps.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 402

PostPosted: Fri Dec 25, 2020 6:18 am    Post subject: Reply with quote

ParkourPenguin wrote:
The resolution of timers is limited by that of the system timer, which is generally about 10-16ms. Fine for 60fps (16.6 ms per frame), but not for 144fps (6.9 ms per frame).

It would be best to hook into the game's rendering engine if you need to sync with fps.


i see.

Thank you both.
And yes i mean fps toggling makes some scripts LAG - like not do stuff in time.

_________________
I am the forgotten one the dead one.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites