Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [0.31.01] Strange material pathing/enumeration  (Read 1724 times)

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
[0.31.01] Strange material pathing/enumeration
« on: April 02, 2010, 06:04:35 pm »





So...yeah.
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235

UberNube

  • Bay Watcher
    • View Profile
Re: [0.31.01] Strange material pathing/enumeration
« Reply #1 on: April 02, 2010, 06:10:42 pm »

That looks just like an overflow error to me. It's probably a bug in the pathing which actually calculates a very large distance, but it overflows to a negative one. I can't imagine a skilled programmer like toady writing a path-finding algorithm capable of producing a negative value under any conditions.
Logged
This guy gets it, the problem with the child torture dungeon is that they weren't set on fire first.

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
Re: [0.31.01] Strange material pathing/enumeration
« Reply #2 on: April 02, 2010, 07:49:10 pm »

That looks just like an overflow error to me. It's probably a bug in the pathing which actually calculates a very large distance, but it overflows to a negative one.
It may be an overflow error, but the items being referred to are one Z-level up and a few steps away. It is miscalculating, regardless of whether it is overflowing or not.

Quote
I can't imagine a skilled programmer like toady writing a path-finding algorithm capable of producing a negative value under any conditions.
Clearly he has, so perhaps you can imagine it now. Toady's a good programmer, but any programmer can make any number of mistakes that cause shortest-path to not work correctly.
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235

Aklyon

  • Bay Watcher
  • Fate~
    • View Profile
Re: [0.31.01] Strange material pathing/enumeration
« Reply #3 on: April 02, 2010, 09:34:41 pm »

Logged
Crystalline (SG)
Sigtext
Quote from: RedKing
It's known as the Oppai-Kaiju effect. The islands of Japan generate a sort anti-gravity field, which allows breasts to behave as if in microgravity. It's also what allows Godzilla and friends to become 50 stories tall, and lets ninjas run up the side of a skyscraper.

ein Syndication

  • Bay Watcher
    • View Profile
Re: [0.31.01] Strange material pathing/enumeration
« Reply #4 on: April 03, 2010, 01:05:18 am »

I believe this used to happen in the older versions when it couldn't find a valid path to the materials normally, but it could when it assumed the tile you were placing already existed. If you go into individual view, it should list some accessible logs mixed in with the crazy negative number logs.
Logged

Zombie

  • Bay Watcher
  • Ǵ̨̕o͘d͝d̡͢e̡̕s̷͟s̵͢ ͝of̴ ͡G͘͠a̧mi̶n̛͝g̨
    • View Profile
Re: [0.31.01] Strange material pathing/enumeration
« Reply #5 on: April 03, 2010, 01:41:53 am »

I can't imagine a skilled programmer like toady writing a path-finding algorithm capable of producing a negative value under any conditions.
Clearly he has, so perhaps you can imagine it now. Toady's a good programmer, but any programmer can make any number of mistakes that cause shortest-path to not work correctly.

I concur here. It likely is a pathfinding bug and if it is then Toady indeed did write a pathfinding algorithm that was capable of producing a negative value under the condition that it overflowed. I highly doubt he intended to, but the result is plainly there. If anyone else has this error, perhaps we can use DorfLogic to see how many tiles the shortest path would be. Keep your saves, as well, as it'll help track down this most strange error.

It's quite odd, though, as overflows usually make the lowest negative number possible +1... Or at least the ones I have seen.
Logged
If I had a dollar for every dwarf whose feelings I didn't care about, I'd have seven dollars, with more coming in the fall.

Urist McSharpblade, Axe Sheriff cancels Justice: Needs more than an axe for this.

MULTI-THREADING - I'm talking about it!

immibis

  • Bay Watcher
    • View Profile
Re: [0.31.01] Strange material pathing/enumeration
« Reply #6 on: April 03, 2010, 01:44:02 am »

I've experienced this bug when I try to build something in a place that doesn't have access to any building materials (but the game thinks it does due to the other pathing bug).
Logged
If I wanted ramps I would've designated ramps, dammit!