Closed toddw123 closed 6 years ago
how do we edit it? i think i am missing permissions. id like to add some code markups (though maybe it would be better to just leave this in comments?).
I'll check to see if I need to grant permissions or something. I would think contributes could edit it but I dont know as I've never used the GitHub wiki before
Hmm the settings shows "GitHub Wikis is a simple way to let others contribute content. Any GitHub user can create and edit pages to use for documentation, examples, support, or anything you wish."
Do you not see either of these buttons when you click the wiki tab?
This is all I see. Hey, question about math in the client. What does the cube of our step distance give us? You were comparing the distance in x squared + the distance in y squared to the cube of our step (Pythagoras's theorem) "if (loc.sqDistanceTo(target) > step step step) else". I get that its finding the diagonal distance squared to the target, but why do we use step^3 instead of maybe the square root of the square distance to the target compared to the step ^1? I know it's a basic math question, but i never learned this. Please explain your process, thanks :+1:
Really strange, maybe you have to be a contributor before you can edit it. Ill check to see what i can find.
As for the math, the forumla to find the distance between two points:
Distance = square root of (x2−x1)^2 + (y2−y1)^2
If you look at the WorldPosData class, there are two functions with similar names. sqDistanceTo and distanceTo. distanceTo is the square root of sqDistanceTo. sqDistanceTo is essentially "(x2−x1) * (x2−x1) + (y2−y1) + (y2−y1)" which is (x2−x1)^2 + (y2−y1)^2.
I originally had the moveTo using "loc.distanceTo(target) > step". BlackRayquaza made the change to "loc.sqDistanceTo(target) > step step" saying its quicker (it makes sense, but is only fractions of a second faster). The square root of something does the opposite of (x x), square root of x^2 would just be x. Well if you dont square root the distance, you can instead just do step^2 and you will get the same results as doing square root distance > step.
I changed it just today to instead check if the distance to the target is within step^3 (step step step), This is actually a huge change, i might lower it a bit, but my idea is the bot will do the whole "jump" to the item if its within the step^3, otherwise it will just do the standard step and then check everything again.
I plan to change it so it will only check if the distance is within 2-3 step distances, if not it will do a regular step, otherwise it will jump to it.
oh and i removed the restriction, you should be able to edit the wiki now.
I figured it was a good idea to get the wiki started and put some tutorials in there on how to get this project setup. That way anyone new that is wanting to build this will have a resource to go over how.
I just finished writing the cURL build page. Only other one i guess is OpenSSL, and thats not really a build as much as its just downloading and making sure you set the path up correctly.
Ill try to get that one created soon, or if anyone else wants to that would be awesome too.
Also, if you ran into any issues while building i would really appreciate if you created a page on what the issue was and how you fixed it. Or maybe there can be a general build errors page or something. I know one of the things that has popped up a few times from other users contacting me for help is the fact that not everyone has windows 10 sdk, and that seems to be one of the required sdk's (doesnt require linking it to visual studios though since visual studios should locate it automatically). I dont know what other sdks/things are required from a fresh build since i cant remember the last time i had a fresh build with no sdks installed. I feel like the copy of visual studios i downloaded came with all the needed sdk's and i only had to download the 2 libraries to get this project working. Idk.
So yup, anything you can add would be awesome. I would like to eventually get some code descriptions/write-up in there as well so people can refer to it if they want to do something with their bot. But that isnt as much of a priority as coding lol