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 


Performance/Stutter issues when using register code

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

Joined: 04 Jul 2015
Posts: 105

PostPosted: Mon Aug 08, 2016 12:10 pm    Post subject: Performance/Stutter issues when using register code Reply with quote

Hi, I've been having a problem for quite some time now and I'd finally like an answer on how I can solve this if anyone knows how as I rely a lot on debugger scripts due to an integrity checker, enough of that..

Okay, so you know how you can right click an address, change register at this location set for example EIP to the address under it to cause the NOP effect, or change any of the other registers.. Yes, ok so I got the script to do this for me and I know it works because the script itself does work:

debug_setBreakpoint("ModuleHello+81573", 1, bptExecute, function()
EIP = getAddress("ModuleHello+81576")
end)

but there's an issue, after I've executed it, the cheat itself works flawlessly fine, but I get severe stutters every two seconds.. Framerate goes down for a second then back up, it's really weird. I have no whatsoever issues with framerate when manually setting a register change on breakpoint, it only happens with the scripts.


Last edited by Stacktrace on Mon Aug 08, 2016 12:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Mon Aug 08, 2016 12:18 pm    Post subject: Reply with quote

Debuggers slow down the game if the game runs the code frequently. Editing memory directly doesnt require the debugger to be running (might be wrong about this part but it seems logical).
Back to top
View user's profile Send private message
Stacktrace
Expert Cheater
Reputation: 1

Joined: 04 Jul 2015
Posts: 105

PostPosted: Mon Aug 08, 2016 12:19 pm    Post subject: Reply with quote

cooleko wrote:
Debuggers slow down the game if the game runs the code frequently. Editing memory directly doesnt require the debugger to be running (might be wrong about this part but it seems logical).


Yeah, I thought it'd be something like that as the script contiously changes the register once it runs I'd assume.

I don't have any framerate issues on my other computer though so you're probably right, depending on how the computer can handle the contiously running loop..

Any way to prevent this? There has to be somewhat a register changing code I can run in order to have my cheat working automaticly without the lag..? Thanks for your reply :p
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Mon Aug 08, 2016 12:35 pm    Post subject: Reply with quote

Just inject new code using the code or aob template, move your value into the register before the instruction runs.
Back to top
View user's profile Send private message
Stacktrace
Expert Cheater
Reputation: 1

Joined: 04 Jul 2015
Posts: 105

PostPosted: Mon Aug 08, 2016 12:37 pm    Post subject: Reply with quote

cooleko wrote:
Just inject new code using the code or aob template, move your value into the register before the instruction runs.


No, it doesn't work like that due to the game using an advanched integrity checker. I guess there's nothing I can do about the stuttering then, or I'll have to get into bypassing security which is tedious and takes a lot of time..
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Mon Aug 08, 2016 12:44 pm    Post subject: Reply with quote

why dont you steal the address manually and simply have a thread write the address if the game checks the code?

Also, dont run get address each time? Maybe you can simplify the steps the debugger must take each time to prevent lag.

global bAddr = 0

debug_setBreakpoint("ModuleHello+81573", 1, bptExecute, function()
if bAddr then EIP = bAddr else EIP = getAddress("ModuleHello+81576"); bAddr=EIP end
end)

Code may not be 100% correct, fix as needed, lol
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Tue Aug 09, 2016 1:15 am    Post subject: Reply with quote

I believe cooleko is right,
I've noticed myself that using getAddress constantly slows down code execution drastically.
Generally, once you've got the address, there is no point to keep calling getAddress, unless of course it has changed (which I doubt).

Been using this simple function for quite of time, just to avoid those if and else statements
Code:
local cega = {}
function getAddress2(address,boolean)
   local s = cega[address];
   if (s) then
      return s
   end
   cega[address] = getAddress(address,boolean);
   return cega[address];
end

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Tue Aug 09, 2016 1:27 am    Post subject: Reply with quote

What is the significance of the boolean? The wiki doesnt show an overloaded option.
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Tue Aug 09, 2016 1:30 am    Post subject: Reply with quote

cooleko wrote:
What is the significance of the boolean? The wiki doesnt show an overloaded option.

Cheat Engine allows you to get address internally by passing true as a second param.
Quote:
getAddress(string, local OPTIONAL): returns the address of a symbol. Can be a modulename or an export. set Local to true if you wish to querry the symboltable of the ce process


I don't know what wiki you're checking, but I go with main.lua every time Smile)

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Tue Aug 09, 2016 1:33 am    Post subject: Reply with quote

typically do, but just googled it this time:

http://wiki.cheatengine.org/index.php?title=getAddress
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Tue Aug 09, 2016 1:36 am    Post subject: Reply with quote

cooleko wrote:
typically do, but just googled it this time:

http://wiki.cheatengine.org/index.php?title=getAddress

Never actually knew C.E has wiki section for Lua, very interesting, probably will contribute to it in the future.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
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