27-11-2006, 04:34 PM
I suggest removing the speed hack names. I dont see a reason why the names should be posted.
Great tut otherwise
Great tut otherwise

Alternative to GetTickCount
|
27-11-2006, 04:34 PM
I suggest removing the speed hack names. I dont see a reason why the names should be posted.
Great tut otherwise ![]()
27-11-2006, 04:43 PM
Well people on come here to make a game from a source, im sure they wont speed hack there own game, also i think verrigan posted an anti speed hack tutorial.
27-11-2006, 05:46 PM
Okay, just know there are bad guys out there that wants to cheat
![]() I'll try this later.
27-11-2006, 06:15 PM
You made your point, ill add it
![]()
27-11-2006, 06:51 PM
I just added it and it works perfectly fine. I didn't test any hacker tool, but it seams to work ^^ Maybe I'll just need to add a few Int() someplaces, but that's ok for now. Very nice tut!
27-11-2006, 07:54 PM
I added int only once becouse I have a lag packets that tells players how much 'lagued' they are... and I dont want it to say 15,876 I want int value, that's all, the Int() is not even acting over GetTickCount but into an other variable.
27-11-2006, 08:10 PM
Dragoons Master Wrote:I added int only once becouse I have a lag packets that tells players how much 'lagued' they are... and I dont want it to say 15,876 I want int value, that's all, the Int() is not even acting over GetTickCount but into an other variable. weey. Thats a good idea =P To tell them how laggy they are ![]()
28-11-2006, 03:58 PM
Hummm, I can post a tut, is a pretty simple code... Maybe I'll post it as the tut for the contest
![]()
28-11-2006, 05:44 PM
Verrigan Wrote:Dragoons Master Wrote:Maybe I'll just need to add a few Int() someplaces, but that's ok for now.You don't want to use Int() because it returns an integer, which is only 2 bytes. My GetTickCount() function returns a Double, which is 8 bytes, so you would (possibly) get an OverFlow error if you try to use Int(). Sorry Verry, but "Int()" actually returns a Long. You'd expect that it'd return a Integer based on the name, but a Long IS an integer, but it just doesn't have the same name.
28-11-2006, 06:57 PM
I haven't tested your tutorial, but I did test speederxp to see it's effects on a vanilla MS303. My character zoomed around pretty quickly! I also noticed that the server was saving every 20 seconds rather than 10 minutes xD
I pushed SpeederXP to the limit though, maxed it out. EVERYTHING on my computer stopped responding. I had to restart for the first time in like 3 months x.x
29-11-2006, 03:20 AM
What's with the elysium-based (haha) hostility?
29-11-2006, 04:00 AM
Oh okay.
Just out of curiousity, does this have any real advantage over just checking the names of the programs that they're running, and just auto-banning them that way? That's what i was about to start working on, because it would be more effective than simply speed hacks alone...
29-11-2006, 04:09 AM
Verrigan Wrote:Pingu didn't want to approve of it as a valid, working tutorial, and suggested that it was not useful (for Elysium).. So I withdrew my offer for its use in Elysium. Verrigan, I only didn't approve it yet because nobody actually said it stops speed hacks, and not because I have some illogical hatred for you... Look, my posts have nothing to do with a tutorial's approval or not, they are just me as a user saying something (as opposed to me as an admin). I wrote my own code only because I wanted to try and fix the problems with your code, but it ended up just having more (namely speed issues). This is just the way I am, and I try to be an expert on something I know very little about with a few Google searches and some quick code. Anyway, as for stopping speed hacks in general, this way would be useful only if the speed of the new function is about the same as the old one. If it's any slower, you could just do Verrigan's other anti-speed hack tutorial that just checks for any speed changes in the tick count compared to a fixed timer. Just looking for the hack's name would not work very well, because a simple name change could bypass it and even then, you'd spend a LONG time getting the names of all the speed hacks...
29-11-2006, 04:24 AM
Why don't you just throw in an elapsed calculate server-side? You'll still be able to do a mild speed-hack, since you have to take into considerate the time it takes the packet to travel to and get processed by the server, but you wont be able to speed hack much. It'd be a good addition to any of the other methods.
29-11-2006, 10:26 PM
Verrigan Wrote:You said you didn't see any use for it in Elysium. (Can't quote this, cause my thread on the Elysium forums was deleted on my request) There are much better ways of stopping speed hacks, that's all I really said. I wasn't singling out Elysium either, because it'd be the same for Mirage. Verrigan Wrote:As for it being slower.. Of course it's slower. It's using 64 bits on a 32 bit system, but my FPS on Kronia is still exactly the same, so it must not be hurting anything too badly. FPS cap that might not be binding in slower machines. Just thought I'd point that out... Verrigan Wrote:You were being critical where being critical wasn't warranted.. I clearly stated the slowness of my approach as being a con. That wasn't the issue.. The issue was whether or not it works.. and, the answer to that is yes. You got stuck on the slowness of it, and it's not really all that slow... Apparently you didn't even bother to test it.. So whatever. You PMed me about your tutorial specifically, so I payed more attention to it. Of course I didn't test if it stopped speed hacks because I myself have never used one before (and never will, frankly). I did use your code and tried it out with a sample application to see if the actual tick count thing worked, however. I only made my version because you stated the memory thing as a con and I thought I could fix that. I was just suggesting an alternative that didn't have your cons, but I created my own anyway so there wasn't much point (I'm guessing my way is slower than yours). What the heck, I'll download a speed hack and try out various methods myself. I'll make a simple program with all of them and even figure out the respective speeds (with the original GetTickCount as the control). You win Verrigan, mainly because I'd hate to not have you participate with Elysium any longer just because I butted into your tutorial. PS. Your topic is in the hidden recycle bin, I can restore it at your request. EDIT: Perfect results! I downloaded SpeederXP and make this sample exe to compare GetTickCount, your method, and my method. Before running SpeederXP, all the tick counts were in perfect unison. I maxed out SpeederXP and... GetTickCount said 514 seconds had elapsed. Verrigan's method said 10 seconds had elapsed. Pingu's method said 10 second has elapsed. My computer is fast and didn't freeze up (still 1% comp usage at max speed). It's obvious that both our method work, but I'll set up a speed test now to see who's is actually faster. ![]() EDIT EDIT: Contrary to popular belief, speed hacks DO effect the interval of timers in a project. There goes your old tutorial Verrigan...
29-11-2006, 11:17 PM
I've already made a test program and I'll compile an exe quickly.
EDIT: Here you go: http://www.splamm.com/sigs/GetTickCount.exe EDIT EDIT: Well, I managed to find some problems with our methods... Your method is largely fine, but a potential problem is that the "Calculating..." text occasionally is bumped a few units to the left meaning a zero was missed somewhere and you've got a much lower number than it should be now. However, I currently believe that there is a simple, rational explanation that poses no problem. The number just ends in ".0" sometimes and VB doesn't bother outputting the ".0"... My problem is a bit more extreme. Run the first test for a minute and you'll see why. It skips 40 seconds at the start of a new minute. The reason is obvious and I'll have to fix it pretty soon. However, this is not a bad error because I'll be ditching all the strings I used before and I'm sure my newer method will actually be faster if I manage to complete it!
30-11-2006, 12:15 AM
Verrigan Wrote:Can you recompile with a GetTickCount() method at the bottom? I completely forgot that it'd be a good idea to compare with GetTickCount... And if you don't notice, I had to remove my method for you because I was still fixing it. This would be a great place to ask why the hell I'm getting overflow errors: Code: GetTickCountMethod = (SysTime.wDayOfWeek * 86400000) + (SysTime.wHour * 3600000) + (SysTime.wMinute * 60000) + (SysTime.wSecond * 1000) + SysTime.wMilliseconds - 2147483647 Don't let the big numbers fool you, this number really does fit in the ranges of a long. I keep getting an "Overflow" error at seemingly random times. I've debugged a bit and have determined that I get that overflow error if the milliseconds equals "0" (there is a 1 in a thousand chance of that, and it'll occur with enough calls). I really can't see why the hell I'd get an overflow if I tried adding zero to the number... If I can fix the above error, then I'll have a method that competes with yours speed wise...
30-11-2006, 02:38 AM
The stupid thing likes to work every once in a while. I run the thing and I get overflow at the weirdest locations now. I split that one big line into multiple lines (slowing it down, but it might work more consistently...) but I'm getting overflow every once in a while and now it's telling me that "22 * 1000 = overflow". I really don't understand why it's giving me these errors, but it's weird.
I managed to run it a few times without the error and the speed results aren't good enough for me to continue. GetTick - 3.7 Verrigan's - 4.1 Mine - 5.0 Oh and Verrigan, it seems awfully forced when you say "Can't wait to see yours working". EDIT: I just had another idea. Why don't we just make our own TickCount like Microsoft does? Make a timer that just increases a variable every certain amount of time. EDIT EDIT: I've made a basic version of that idea, but it's not going so great. The interval is set to "100" and even then it doesn't keep an accurate second (it's a bit slower). I ran a speed test though and it's 3.7 for my method and 3.9 for Microsoft's, but that speed increase isn't really worth it.
01-12-2006, 07:06 PM
1,000,000,000 loops:
GetTickCount: 17.453 Verrigan: 17.984 Honestly, there isn't too much difference between both methods but that Verrigan's way is no influenced by speed hacks. However, an overlooked issue that I just realized is that Verrigan's way will cause a some problems if you change your computer time. however, this would be a minor pause/jump depending on a total change. Actually, I just thought up another problem. It's all too possible to write a simple VB program that speeds up the computer clock. Sure, this method is speed hack proof, but not speed hacker proof ("speed hack" = downloadable program and "speed hacker" = the guy who wants to hack and can program a bit).
02-02-2007, 12:55 AM
I checked this out the first time you posted it and it came with that big conversion overhead - cool to see that you got rid of that!
Great post, Verrigan! Edit: Not sure if someone has posted this, but if you want to use the format of the function returning instead of passing a variable ByRef, you can create a wrapper like so: Code: Public Function CurrentTime() As Currency Its the same speed just about if you are creating a variable just to hold receive the time value. I personally use most every counter in the format of X = Time + Y, so I find this priceless. :wink:
06-03-2007, 11:31 PM
The first post of this thread is up to date isn't it? And I think what one means is, where do you put the second part of the tutorial? It would be much easier for newer users if you actually showed an example using the MS source itself, atleast then they'd get a good idea on how to use it properly.
Thanks though.
08-03-2007, 07:35 PM
So changing a computer clock and school will mess stuff up?
![]() Quote:Robin:
09-03-2007, 03:23 AM
So after adding the API declaration I can just replace all call gettickcount with the one you posted in the edit?
09-03-2007, 06:48 AM
Thank you Verrigan, you've been most helpful.
03-04-2007, 08:10 PM
This is a must add, for everyone.
I was having that issue where I couldn't attack and non admin characters get booted for packet flooding. If you convert to this, you won't have that issue anymore. I strongly suggest you convert to this. It was so simple to do. |
« Next Oldest | Next Newest »
|