+-

Elder Scrolls


Author Topic: Dota 2 Custom gaming  (Read 4169 times)

Chakra

  • Runtag Supremo
  • *****
  • Posts: 279
    • View Profile
    • Chatcraft
Re: Dota 2 Custom gaming
« on: July 13, 2014, 06:53:20 am »
The physics of jumping are actually relatively simple.

WC3 uses an entirely grid-based movement and pathfinding system. What this means is that you can subdivide the entire map into a distinct, regular grid. WC3's reduces down to a 32x32 resolution grid system. This means that a normal farm, which is 128x128 units, is made up of 16 unique cells. All buildings are made up of exact, fixed amount of cells, called a pathingmap; the smallest object that uses a pathingmap is an item, which you've probably already seen as taking up 1/16th of a farm or 1/4th of a tiny farm.

Units also are interpreted on this grid system, though they are freely, non-bound agents. Units have a collision size, which simple means radius. What WC3 does is reduce the circle around a unit into the cells that it is occupying and the cells it is not. The cells it occupies are considered by the game for all calculations, not the free circle around the unit.

After you understand that, things actually become much simpler. The movement system no doubt uses some type of grid-based pathfinding algorithm, my guess would be some variant of A*. The actual system you use doesn't really matter, as we, as players, don't really adapt that much to the pathfinder, but rather the jump physics.

Jump physics are separate depending on whether it is mirror imaging or simple unit relocation (i.e., building a farm on yourself). The latter is done by using a regular system that moves your unit to the closest spot you can be placed, and it does this by scanning grid-spaces rather than linear distance. I don't remember the exact number off the top of my head, but if a unit cannot be placed within n spaces, it is simply kept where it is. The important tidbit is that a line of diagonal cells is worth the same as a horizontal cells. This means that if the first open diagonal location is 8 cells while the closest horizontal or vertical distance is 9 cells, it'll place you diagonally. Why does this matter? Because, using a 32x32 cell resolution, going diagonally across 8 cells is ~362, while horizontally across 9 is only 288, so the game prefers to jump you diagonally over horizontally/vertically by a root 2 factor.

The final piece of physics that matters is mirror jumping. What happens you mirror jump is that it takes your current position and facing angle, then picks two points left and right a regular distance from your start position. This distance is freely changeable within WC3, but by default is, I believe, 64 units, meaning a perfect farm space exists between the two if a user images in the open (though one might not be buildable, as buildablility works on a 64x64 resolution grid, so it is likely one of those grids is infested by a single 32x32 cell or two). Once we have this point, the game will then try to find the nearest point that the unit can actually be placed. The cool thing is if this point is on another level (i.e., up or down a cliff or two). This means it must find the closest point on another cliff. This distance it seeks is a bit different than normal jumping, and may be related to the Area of Effect field for the ability, which is set to 1000, but I'm not sure (haven't tested it).

The next thing it does is a near repeating of the above, except now it tries to find a placeable location on the original level (as you can't jump up or down a level, without some active manipulation). This is, of course, a repeat of finding the closest location. The maximal distance this will go is again some unrelated figure to the previous two and, again, may be related to Area of Effect, but I'm not sure. I know, however, that it is not the same as the former calculation, and it seems a bit short to be the first one.

I think that details all the complex physics of ST. The actual figures, once you understand what is happening, is easily testable by playing around with terrain and placing farms (tiny farms would be easiest, though a custom one with item-sized pathing would be more precise, though it should replace an item's pathingmap, as buildings can only be placed on a 64x64 grid).

 

Recent Posts

Re: Sheep Tag (East) A Complete History by iAMMYOWNSTONE
March 26, 2023, 04:46:15 am

Re: Sheep Tag (East) A Complete History by Alph4bet
January 03, 2023, 02:14:02 pm

капли для похудения by Mrunitemanymn
August 19, 2022, 07:27:59 pm

капли для похудения by Mrunitemanymn
August 19, 2022, 12:44:08 pm

Reconnecting With The Community - Sheep Tag Discord by FaceOfMelinda
January 11, 2022, 12:45:00 am

Re: Sheep Tag (East) A Complete History by Mitnek
August 17, 2021, 04:11:39 am

YOoooo by Celestial_One
February 04, 2020, 04:05:05 pm

hey guys! by Celestial_One
January 01, 2020, 01:08:18 am


Shoutbox

January 11, 2022, 12:39:49 am FaceOfMelinda: The latest Sheep Tag Rankings (2021/2022): https://www.youtube.com/watch?v=0ACV84GNVag&ab_channel=MythSociety

September 23, 2020, 06:00:39 pm glow: I can't get back on the discord! Someone send me an invite link please!

September 23, 2020, 05:42:58 pm glow: Anyone play wc3 anymore?

December 01, 2019, 03:32:00 pm GothaWOLF: hihooo

November 23, 2019, 04:48:49 pm XXXandBEER456: We're all on Discord now: http://tiny.cc/sheeptag

July 17, 2018, 07:09:50 pm Wyvernrider: woof

June 19, 2018, 08:55:32 pm Celestial_One: Wow honestly feels really nice, let me know when you need a beta tester. I was giggling at my nostalgia the whole time. It's super cute.

June 19, 2018, 06:58:28 am XXXandBEEER: Here's a demo cele: http://lunawolfstudios.com/wp-content/uploads/2017/12/Sheep-Tag-2-Example-Test.zip

May 30, 2018, 03:35:19 pm Celestial_One: BEER how is sheeptag 2 coming along

May 13, 2018, 06:56:50 pm drewisfat: I am undefeated in STWCs where Sheepgod isn't on my team :)

May 04, 2018, 09:50:54 pm Celestial_One: anyone remember that time when mike died to an afk wolf in a STWC?

May 04, 2018, 05:15:55 am Alph4bet: Cele, Drew sold you to oSa ages ago. All know this.

May 04, 2018, 01:56:28 am Celestial_One: no ye it's cool not like I'm a part of StH or anything

April 23, 2018, 08:03:09 am SHEePYTaGGeRNeP: join the discord via www.Sheeptag2.com because that's where we communicate

April 22, 2018, 08:27:23 am Exa: Hello. The congregation of the northern star and pastor E.Larsen decided to rule against Sidey in the comissionary court. I call upon ALL believers of the one true God to fight against Sidey! Indeed, like most of you believed for years he has been under the control of the dark lord. I guess that explains why he ruined the community 6 times? Over and out!!

View Shout History