Author Topic: mine distance for claw  (Read 5724 times)

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
mine distance for claw
« on: November 09, 2016, 05:31:06 PM »

ok first thing I have to say is:

You are absolutely right, kurwa. They are not the same distance, but I still have an explaination for you.

I was concentrating on making sure the distance was 4 between the halls (same as hall width), but of course the minimum distance between mine and hall is 3 not 4.

My bad... not enough sleep...

But I can still explain why. Will post that soon, but wanted to say that as its been more than the 10 minutes i promised.
its gooder to hax hard and NEVER get caught!

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: mine distance for claw
« Reply #1 on: November 09, 2016, 08:09:36 PM »
OK don't have time to write a really good explaination but, in a nutshell, it's calculating distance from the top left corner of the mine.

hall is 4x4
mine is 3x3

hall size is taken into account
mine size is not

units are located where their top-left corner is (you can play with the map editor to see this)

Probably they have re-used code from the unit attack AI to find the closest enemy (with annoy factor).





Its the same thing as the old tower bug, where towers firing up and left would hit other towers that wouldnt fire back, because the size of the destination is being taken into account, but not the size of the source.

In this case you can think of the mine as shooting peons at the hall ;)

As mentioned the distance is what I call "square" distance - the maximum X or Y distance from the top left corner of the mine to the closest point on the hall.

so with that map....




because of the extra 2 squares in the width of the mine, the distance becomes 5 not 3, which is greater than the distance between the halls (which is 4) so in effect they are the same distance, in which case the peon will go for the hall with the lower Y co-ordinate (as they were both on the .PUD, if u built them it would go for the one you built first.

 =D

EDIT:
... this is why you dont see this bug on the other side of the map where the halls are to the left of the mine, because then the distance is only 3, so its less then the Y offset....

 (btw: the calculations on the pic above should have -1 on them, = 5 not 6 , but u get the idea)





« Last Edit: November 09, 2016, 08:21:46 PM by Lambchops »
its gooder to hax hard and NEVER get caught!

Offline I hate naggers

  • Ogre Mage
  • ********
  • Posts: 2345
    • View Profile
Re: mine distance for claw
« Reply #2 on: November 10, 2016, 01:31:28 AM »
Quote
because of the extra 2 squares in the width of the mine, the distance becomes 5 not 3, which is greater than the distance between the halls (which is 4) so in effect they are the same distance, in which case the peon will go for the hall with the lower Y co-ordinate (as they were both on the .PUD, if u built them it would go for the one you built first.
that means i cannot solve the problems with 3 mines by putting them 1 line below current location. It needs to be 2 lines. So i have to move the mine AND add 1 line of distance between camps. God dammit blizzard

thank u for analysis

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: mine distance for claw
« Reply #3 on: November 10, 2016, 02:45:34 AM »
its gooder to hax hard and NEVER get caught!

Offline I hate naggers

  • Ogre Mage
  • ********
  • Posts: 2345
    • View Profile
Re: mine distance for claw
« Reply #4 on: November 10, 2016, 05:17:13 AM »
that wasnt an actual gameplay on that map, i dont know why you and maciek joined - it was merely to test that aspect of the map. I knew the halls were "closer" but i was aware of occasional peon retardation. Now we have the official explanation why

kurwa, i think i will redesign the map anyway. FOK

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: mine distance for claw
« Reply #5 on: November 11, 2016, 12:11:09 AM »
...actual gameplay on that map, i dont know why you and maciek joined - it was merely to test that

We were there as UN independant observers trying to make sure no special-needs peons had their rectal sovreignty encroached upon. Shortly after arriving however, it became clear we were already too late. Our deepest condolences go out to the tribes of those affected.

kurwa, i think i will redesign the map anyway

Cool  8) the idea has some interesting possibilities. Will need a lot of fine tuning to get the balance right, but it could be awesome...
its gooder to hax hard and NEVER get caught!

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: mine distance for claw
« Reply #6 on: November 11, 2016, 03:24:07 AM »
Spot the difference  ;)
its gooder to hax hard and NEVER get caught!

Offline I hate naggers

  • Ogre Mage
  • ********
  • Posts: 2345
    • View Profile
Re: mine distance for claw
« Reply #7 on: November 11, 2016, 03:31:05 AM »
that's possibly a nice map. the 9 zig-zag area looks kinda pointless tho

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: mine distance for claw
« Reply #8 on: November 11, 2016, 04:24:40 PM »
I just cut&paste some bits of gow. Its got 11,12,4,5,s9,s6 and s12 with water and trees round the sides. The zig-zag is s9 with trees on the left.
its gooder to hax hard and NEVER get caught!