Thread: Decent way to handle object interaction distance

Results 1 to 6 of 6
  1. #1 Decent way to handle object interaction distance 
    Registered Member
    I hate Guns's Avatar
    Join Date
    Mar 2009
    Posts
    6,932
    Thanks given
    1,918
    Thanks received
    2,628
    DiscordTag
    TwistedBoner#2217
    Rep Power
    5000
    So, I'm not actually sure if this is exactly the proper way to do this.

    So let me explain.

    When you click on an object, the client is going to generate a walkable path to the object, which you read on the server and use for the players walk path.

    You should somewhere in your walking packet have a snippet of code that resembles something like
    Code:
    		for (int i = 0; i < steps; i++) {
    			path[i][0] += firstX;
    			path[i][1] += firstY;
    			player.getWalkingQueue().addStep(path[i][0], path[i][1]);
    		}
    The last point of the generated path, is the closest you can get to an object from the direction you're walking from

    I'm not actually sure if thats how its done on RuneScape, but it's currently the best method I have of doing it.

    Reply With Quote  
     

  2. #2  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    31
    Posts
    12,510
    Thanks given
    164
    Thanks received
    5,277
    Rep Power
    5000
    jagex have serversided walking to verify that your path is legit, if u delete all objects clientside u can still only walk where u normally could

    btw this thread makes no sense im not even sure what ur talking about

    Reply With Quote  
     

  3. Thankful users:


  4. #3  
    Registered Member

    Join Date
    Feb 2015
    Posts
    795
    Thanks given
    5
    Thanks received
    176
    Rep Power
    111
    I don't think this really means anything unless the rest of the validation etc is shown from your server side? If you shared that, then it would make a bit more sense.
    Reply With Quote  
     

  5. #4  
    Im an albatraoz

    Nand0's Avatar
    Join Date
    Feb 2010
    Age
    27
    Posts
    814
    Thanks given
    193
    Thanks received
    113
    DiscordTag
    Nando#4518
    Rep Power
    116
    uuhm i dont get it
    [Only registered and activated users can see links. ]






    [
    Reply With Quote  
     

  6. #5  
    Registered Member
    Chivvon's Avatar
    Join Date
    May 2016
    Posts
    446
    Thanks given
    49
    Thanks received
    108
    Rep Power
    171
    This is not a proper way of doing it. Horrible on many different points of analysis. Great that you're aware of it, just a warning for others.

    Thanks for the snippet. On the up note it is an interesting solution
    Reply With Quote  
     

  7. #6  
    Janemba!!!!

    Women's Avatar
    Join Date
    Mar 2010
    Posts
    1,686
    Thanks given
    427
    Thanks received
    707
    DiscordTag
    Nick B#0142
    Rep Power
    551
    100 errors

    help
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Better way to handle objects
    By TheRedArmy in forum Snippets
    Replies: 6
    Last Post: 03-29-2014, 07:14 AM
  2. What's the best way to handle dialogue?
    By Paketa in forum Help
    Replies: 3
    Last Post: 04-11-2009, 02:37 AM
  3. Adding a nice way to handle objects (emulous)
    By Livinglife in forum Tutorials
    Replies: 15
    Last Post: 03-23-2009, 10:15 PM
  4. Fastest way to load objects ?
    By supra s in forum Help
    Replies: 2
    Last Post: 03-07-2009, 08:34 PM
  5. An easier way to fix object (too far to get)
    By Ultimate in forum Tutorials
    Replies: 3
    Last Post: 12-11-2008, 12:35 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •