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 


Speed hack inspired from Cheat Engine sources

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
COBIT
How do I cheat?
Reputation: 0

Joined: 01 Aug 2017
Posts: 2

PostPosted: Tue Aug 01, 2017 1:45 am    Post subject: Speed hack inspired from Cheat Engine sources Reply with quote

Hi,

I made a Speed Hack dll inspired from Cheat Engine source code.

It is written in C++ and it is basically a DLL injection with hooks of the time APIs exactly like CE does it (GetTickCount64, GetTickCount and QueryPerformanceCounter)

It works BUT when I slow down time the game is not fluid any more at the level of graphics and sounds. (there are cuts in sound and frame per second drop a lot)

At first I found it normal since I am after all braking the time right?

But when I do the exact same thing with CE, it plays smoothly !?

Is there something I overlooked in the CE sources?

How come the Directx graphics and sound rendering can stay fluid while time is slowed down?

Thanks
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Tue Aug 01, 2017 8:30 am    Post subject: Reply with quote

is your speedhack based on 5.6 or later or earlier ?

e.g make sure there is no sleep() inside the hook (or any other delay)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
COBIT
How do I cheat?
Reputation: 0

Joined: 01 Aug 2017
Posts: 2

PostPosted: Tue Aug 01, 2017 10:41 am    Post subject: Reply with quote

Thank you for your advice Dark Byte.

Dark Byte, your software is brilliant and you are some sort of legend to me so I would like to tell you how much I am happy to interact with you finally today Cool

I am inspired from your new method of Speed Hack so the "new" one using injection.

I found what the problem was:
The hook functions I wrote obviously have to manage the concurrency (multi threading) and I originally used a stupid mutex for that.

That kind of mutex is too slow because it puts at sleep the threads that failed to gain the lock. Commutation time is really bad.

Now I am using SpinLock mutex which are way way faster and the game is totally fluid and the speedhack works perfectly.

It was a good learning experience for me

Again, thank you for responding and for your time

COBIT
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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