The Sad Truth About ToEE's Pathfinding

Discussion in 'The Temple of Elemental Evil' started by Gaear, Apr 23, 2012.

Remove all ads!
  1. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    Basically it sucks, for two primary reasons: it doesn't do a good job at what it's supposed to do; and it has a negative impact on system performance, presumably because every time you make a movement command (or even just mouse around, once you have made a movement command), it's causing the game engine to make tons of calculations on possible/impossible/best routes and using up resources. As regards the latter, I quite accidentally discovered recently through some unrelated testing just how much impact it does have, and this had led me to decide to remove pathnodes altogether from the Hommlet, Nulb, and Verbobonc exterior maps for the next release.

    This will have a few different immediate effects that will be pretty obvious to the player right away.

    Negative

    1. You won't be able to issue long-range movement commands. The game engine handles movement within a twenty tile radius without the use of pathnodes anyway (according to Agetian's excellent research), and this is what you will be limited to in most cases. (I have seen exceptions for reasons I'm unclear on.) Twenty tiles can generally be thought of as the distance within typical range of sight before fog of war takes effect. I question whether experienced players use long range movement commands anyway however, being as this typically leads to heartache. I know I don't, so it's possible the impact won't be too severe. Basically it means that we won't be able to use a game feature anymore that sucks anyway.
    2. You will more often have instances where not all party members follow a movement command, so the party may leave one or two behind. This is for some reason more common without pathnodes, possibly because if there's an obvious obstruction, the game engine won't look for alternative routes and instead just quit. This sounds scary, but the truth is, it probably sounds worse than it will be.
    Positive

    1. You won't go on anymore crazy routes. When movement is handled without the use of pathnodes, it's always a straight shot. So if you click on point B from point A within the twenty tiles, each member your party will go straight there. No American football wide receiver routes, no puzzling 'I formation' approaches, no alley-oops.
    2. System performance will be vastly improved. If my system is any indicator, you will be able to scroll all over the map with virtually no 'hiccups' and delays, and likewise movement around the map will be mostly hitch-free. I'm even hopeful that this may ameliorate or even eliminate jerkstop. If the theory that jerkstop is caused by systems being too taxed has merit, it should at least not hurt, and very likely help. Either way, I believe performance will be significantly improved.
    Basically, 7.2 will be a testbed for seeing how this measure works. If people hate it, we'll go back. If they love it, we won't. And if it kills jerkstop, we definitely won't. :)
     
  2. J'allan UlDragos

    J'allan UlDragos Dragon Warrior

    Joined:
    Feb 13, 2009
    Messages:
    279
    Likes Received:
    0
    Yay!!! certainly sounds bearable... so when is ver 7.2 planned to arrive? :)
     
  3. sonofliberty

    sonofliberty Established Member

    Joined:
    Apr 14, 2012
    Messages:
    522
    Likes Received:
    2
    I believe he said the 29th.
     
  4. sirchet

    sirchet Force for Goodness Moderator Supporter

    Joined:
    Dec 6, 2003
    Messages:
    3,721
    Likes Received:
    49
    I always thought you couldn't move beyond the fog of war.

    So, guess I wont be missing anything then. :p
     
  5. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Speaking as a person accustomed to using speedup() at speed 5-6 to navigate through locations, I'd miss it.

    If it does turn out to noticeably help with the Jerkstop problem, then it's an acceptable loss I guess, otherwise I'd like it reverted back. The performance on Hommlet etc. never struck me as troublesome anyway, certainly not on modern machines (and those are getting more powerful as time goes by as well).
     
  6. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    "If people hate it, we'll go back. If they love it, we won't. And if it kills jerkstop, we definitely won't."

    Is it possible for the Co8 Modder's to make Pathfinding an add-on or an option in front-end for 7.2 and future modpacks? which I think will "become obsolete" be probably eliminated soon. If so, that's great! for those who wants to stay with pathfinding option, and not. I think this is a very flexible way to test it, while having more feedbacks and satisfy the testers and eventually find-out what is there to it.

    Just a suggestion, I hope you find this helpful.
     
    Last edited: Apr 24, 2012
  7. sirchet

    sirchet Force for Goodness Moderator Supporter

    Joined:
    Dec 6, 2003
    Messages:
    3,721
    Likes Received:
    49
    Well, it is one more step forward in the process of elimination.

    Being that all we know about jerk-stop seems to be based on expert assumptions, knowing what doesn't cause it can be as valuable as knowing what does cause it
     
  8. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    I think, I have to agree with this. Well, I have to lean to it until matters has found its own resolve. :kirby:
     
  9. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    I don't believe it would be possible to make it an option, and I would be reluctant to anyway because any time we expand options it just means more variations we have to support.

    Exactly. This is basically what we're reduced to now as far as jerkstop goes, being as it's such a cloudy subject. There will likely be more experimental measures like this in coming releases (assuming this one doesn't fix it). The nature of jerkstop is such that it requires a large test sample to draw meaningful conclusions - something we can't really achieve with a handful of volunteer testers. That means the player base at large must become the test group.
     
  10. gazra_1971

    gazra_1971 Knights of Legend

    Joined:
    Aug 3, 2010
    Messages:
    818
    Likes Received:
    2
    My two cents' worth:

    I am used to issuing LONG-distance movement orders whilst moving my party around the insanely HUGE distances of the Hommlet, Nulb, and Verbobonc exterior maps (but I don't increase party movement speed using speedup() ). Personally, I believe that:

    1. path-node movement around Hommlet and Verbobonc aren't that bad (whereas Nulb's path-nodes suck to high heaven, as do the path-nodes within the elemental nodes and within the Temple of Elemental Evil itself!)

    2. jerkstop ONLY occurs when the player's party APPEARS on the HOMMLET EXTERIOR MAP (for me, at least - I haven't attempted the War of the Golden Skull yet) (whether it is by exiting a Hommlet interior map (i.e. building), using the Hommlet sign-post, or using the world-map to travel to one of the 3 locations in Hommlet on the world-map (i.e. North Hommlet, South Hommlet, or East Hommlet)), so something that happens with the game engine while the party is appearing on the Hommlet exterior map (or as the graphics for the characters, NPCs and map are being rendered) is causing jerkstop to occur. I know nothing about the game engine, but the Circle of Eight team have mentioned heartbeat scripts, so that could be one of the things with the game engine that might be causing jerkstop. It seems that heartbeat scripts do not always trigger reliably, so maybe jerkstop could be caused by a heartbeat script that failed to trigger - it's just a theory (I don't know how feasible it is - I'll leave it to the Circle of Eight team to deduce the cause or causes of jerkstop). Or maybe the day-night light-level calculations and/or transitions, or the Hommlet NPCs on the exterior map, or Hommlet NPC day-night transitions, or the Hommlet sign-post itself, or the fact that fog-of-war was removed from the map which may be messing with the NPC permanent combat stance until within range of the player's characters, or bad map sectoring (I believe that Shiningted mentioned that the symptoms of jerkstop are similar to what happens when a map sector has bad/incorrect lighting) of the Hommlet exterior map could be contributing to or causing jerkstop? Whatever the cause or causes of jerkstop, it seems evident that jerkstop was introduced with version 5.0.6 of the Circle of Eight Modpack, so one or more of the changes that were made between that and the previous version of the Circle of Eight Modpack must be causing jerkstop. If the Circle of Eight team have a changelog that lists EVERY single, minute change that was made to version 5.0.6, then it may be possible to determine through testing by deduction which change or changes are responsible for causing jerkstop.
    Does the Circle of Eight team still have the version of the Circle of Eight Modpack before 5.0.6? Maybe it would be prudent to use the data for Hommlet of version 4.0.1 (of the Circle of Eight Modpack) and then apply all of the changes made to Hommlet since then? Maybe that would eradicate jerkstop from the game once and for all? Just an idea.
    Maybe reintroducing fog-of-war to the Hommlet exterior map may eliminate jerkstop once and for all? Worth a try, I think. It may make the War of the Golden Skull MUCH more realistic and playable?

    I definitely would like my party to move in a straight line from A to B but not at the expense of having to constantly issue movement commands every few yards on the game map. But I will try out 7.2.0 with the path nodes removed on said exterior maps before I make my mind up on whether it will be a good change or not (especially if it improves game performance and makes the War of the Golden Skull playable).
     
    Last edited: May 9, 2012
  11. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,170
    Likes Received:
    32
    Actually, jerkstop also occurs during combat in the War of the Golden Skull. It may be an entirely different problem, but the symptoms are very similar.
     
  12. guenthar

    guenthar Member

    Joined:
    Jun 13, 2011
    Messages:
    6
    Likes Received:
    0
    I never have issues with resource usage or anything else so removing pathing would just be removing something that I use frequently. I guess I will just stick with 7.1.0 if people really want it.
     
  13. sirchet

    sirchet Force for Goodness Moderator Supporter

    Joined:
    Dec 6, 2003
    Messages:
    3,721
    Likes Received:
    49
    I wonder, when removing the FOW did the lighting somehow get changed?

    If the path node idea isn't the answer maybe returning the FOW would be a good next step?

    Again, this is just my opinion and I certainly know that there are a few very talented and dedicated people considering the cause of this and I am in no way qualified to offer anything more than my opinion.

    ps, My dad once told me, Everyone has an opinion and it's just like a fart, it stinks, but it's more acceptable to the one making it. ;)
     
  14. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    Removing FOW actually had the opposite effect - it was a relief on resources, probably because the game no longer had to calculate what could and couldn't be seen. Also it was removed in the early days prior to jerkstop's appearance.

    Correct, which supports the idea that JS is related to the number of scripts running - something we intend to look at next if pathfinding doesn't do it.

    I have no objection to however you choose to play, but why is there a need for long range movement commands with the signpost present?

    To be clear, while I disagree to some extent about the quality of pathfinding in Hommlet (whenever I move around I find myself inexplicably going hither and yon), this measure is primarily intended to relieve some degree of overall processing burden, not really to improve pathfinding. ToEE is noteworthy for not conventionally responding to relative computing power like most other software, which is why some modern systems still struggle with it and some older systems don't.

    These are indeed other things we'll be looking at. (Day/night standpoints and the related NPC movement between them,and also waypoints and waypoint-related animations like banging hammers.)

    More specifically, those effects are what Agetian determined to be "fatal sector memory leaks." They are also apparently different from jerkstop, though at first they were thought to be the same. The manifestations are different.

    That's kind of the idea here. ;)

    We have to be wary of seizing upon random bugaboos and setting them forth as large-scale testing releases, because we simply don't have enough resources to do that. (If we choose - without any particular reason - FOW this time, and then butterfly particle effects next time, and then Furnok's girlfriend's outfit the time after that, we'll be doing this forever.)

    I laid out the case against pathfinding above - namely that I noticed a dramatic improvement scrolling around without it, specifically after a movement command had already been issued after arriving on a map. That's what pointed me at pathnodes to begin with. The moment you issue a movement command, the game starts calculating pathnodes. With pathnodes - the normal hitches and slowdowns. Without pathnodes - few to no hitches and slowdowns.

    Coincidence? I think not! ;) (Just kidding ... we'll see.)
     
  15. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    <Path Finding> your a real pain in the ass, you even pawned Verbobonc, but IIRC, Gaear will make a grave for you soon. So prepare because at the very very next day we will not see you again! even your tiny little spooky shiny dust! :rant:

    But I think your existence is permanent, as jerkstop is your ally! let magic missiles struck me if I am wrong! :kirby:
     
Our Host!