Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 9:07 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
PostPosted: Mon Nov 05, 2007 5:47 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Introduction
Currently, all that prevents the movement from happening all the time is the fps lock (this is from k2h, a unedited ms has 50 or something, dunno):
Code:
        ' Lock fps
        Do While GetTickCount < Tick + 32
            DoEvents
        Loop

Although, speedhacks basicly messes with the tickcount. Therefore this part is useless if you use a speedhack. But I'm pretty certain that timers are not affected by speedhacks, therefore we can have a timer around the checkmovement call. So it prevents it from running that call more than it should.

Client Side
Begin with adding a timer to your frmMirage. Set the interval to a number that doesn't affect your walking nor running speed. If you have the interval on 100, for example. Your character will probably run 1 tile, get stopped for some milliseconds, then run 1 tile etc... For my game, using 32 on the FPS cap, I used the interval 20. This however means that a timer will be running almost all the time on your client. But I don't think that affect much, does it?

Now, inside that timer, add (SH = SpeedHack):
Code:
SHMove = 1


Now in any module, add:
Code:
Public SHMove As Byte


Now find:
Code:
' Check if player is trying to move

Replace that part with:
Code:
' Check if player is trying to move
If SHMove = 1 Then
   Call CheckMovement
   SHMove = 0
End If


So now, when you move 1 step, SHMove will become 0 and prevents the Call CheckMovement from running, until the timer makes SHMove = 1. And then you can move again.

I'd like to know what you think of this idea.

Please Test it with a Speed hack Program and report back!

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
PostPosted: Mon Nov 05, 2007 6:20 pm 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
Good effort sir, but speed hacks DO affect timers.

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
PostPosted: Mon Nov 05, 2007 6:28 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Are you certain about that?

If so, I guess we should use the vb Timer function instead, since Grim said that wasn't affected by it. I might update the tut later.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
PostPosted: Mon Nov 05, 2007 6:50 pm 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
I'm positive. Just download a copy of SpeederXP. Make a VB application with a timer and a label. timer interval of 1000, enabled. set the label's caption to 0, then in the timer, put label.caption = label.caption + 1. User speeder XP and you'll see the difference.

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
PostPosted: Mon Nov 05, 2007 7:10 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Okay, I guess timers are affected then too.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
PostPosted: Tue Nov 06, 2007 12:36 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Aug 17, 2006 5:27 pm
Posts: 866
Location: United Kingdom
dont restrict it client side thats a losing battle, check the time it takes them to move 10 squares or something server side, if they move 10 squares quicker than the tickcount wants them too, boot the bastards!


Top
 Profile  
 
PostPosted: Tue Nov 06, 2007 12:49 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Fox wrote:
dont restrict it client side thats a losing battle, check the time it takes them to move 10 squares or something server side, if they move 10 squares quicker than the tickcount wants them too, boot the bastards!

That would require a loop through all the players, and that loop would be running each 100ms. I dont like that idea xD

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
PostPosted: Tue Nov 06, 2007 1:00 pm 
So don't loop. Just check the one player when he moves.. I'm sure that's what Fox was talking about.

You can try to combat speed hacks all you want, someone is going to find a way.

There are speed hacks for Kal Online, Tantra Online, World of Warcraft, Lineage II, and several of the other mainstream / indy games.

They all find a way to combat them, but then a new one just comes out, so it's going to happen..

Though, in a 2D game, I don't really see people doing it.


Top
  
 
PostPosted: Tue Nov 06, 2007 1:02 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Gash, people always say protection isnt needed. Fuck that. People used speed hacks in beta 2 in k2h.

Locked, cause I made a new tutorial.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 30 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group