• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Legacy GM delta_time / fps / date_current_datetime() issue

K

Kabcorp

Guest
Hello, i want to make an anti speed hack system using one of these 3 ways (delta_time, fps, date_current_datetime())

The game is at 60fps using room_speed=60;

The problem is, when i hack the speed at 0.5 (for example) with CheatEngine, these values dont change.
-delta_time is always at 16666 (it should be at 33332)
-fps is always at 60 (it should be at 30)
-date_current_datetime() is always 42999,6 (but i think it's correct because it's another thing)

But the game refresh is at 30fps (visually and for all events)

Is it a bug in code? or it's me?
I tryed with VM and YYC

Thank you =)
 

andev

Member
That's most likely because the game still thinks it's running at normal speed, I don't think cheat engine specifically alters game maker variables (for instance the fps variable). Try using current_time
 

rwkay

GameMaker Staff
GameMaker Dev.
use get_timer() as that is microsecond accurate - though I suspect that CheatEngine is hooking all the Windows API calls and rerouting them so no matter what you call it will be pretending that the time is advancing at the same rate, in which case I doubt that you can tell that you are running under CheatEngine without an extension that would do that.

Russell
 
K

Kabcorp

Guest
Thanks for these answer poeple!

use get_timer() as that is microsecond accurate - though I suspect that CheatEngine is hooking all the Windows API calls and rerouting them so no matter what you call it will be pretending that the time is advancing at the same rate, in which case I doubt that you can tell that you are running under CheatEngine without an extension that would do that.

Russell
I think you are right about CheatEngine...
 
K

Kabcorp

Guest
That's most likely because the game still thinks it's running at normal speed, I don't think cheat engine specifically alters game maker variables (for instance the fps variable). Try using current_time
The weirdest:

Create:
time=current_time;

Draw:
delta=current_time-time; //<--- delta is always equal to 16 when i hack speed:eek:
time=current_time;
 

TrunX

Member
Which speed value are you hacking, the room_speed or the movement speed and if it's the room_speed is the game actually running slower or did you just changed the drawed variable value without any consequences for the game itself?
 
K

Kabcorp

Guest
I hack the general speed using Cheat Engine.
If i do that on GM8.1 all works fine, but not in GM:S 1.4
 

klys

Member
The best way to avoid hacking should be a way to detect another process hooking or editing the memory in ram of the game's process.
 
Top