Fixing the Nodes

Discussion in 'General Modification' started by Shiningted, Jan 22, 2006.

Remove all ads!
  1. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,654
    Likes Received:
    352
    Regarding the Nodes lag: a little while ago I came up with a method to at least identify the problem if not fix it, namely, recreate the maps and add things (clipping, mobs, sectors, pathnodes etc) one at a time until lag began. Since my stuff is old and lags at the best of time anyways, I asked Gaear to perform the excruciating task of testing all this. He concluded (and my own little tests replicated) that the problem lies in a combination of the pathnodes file and the .mobs.

    Why those .mobs and not any others? Don't know.

    All the .mobs or just some? Don't know.

    I do know its not the prototypes - there is no flag / set-up / anything in the protos of the Node monsters that I can see which is not found at least somewhere else in the game (without causing lag). The 4th lvl is a good example - Hedrack is all flagged up as a boss monster, and it has all the graphix of the nodes in terms of the shimmering doorways etc, and pretty much everything found in the NOdes, except the lag. Anyways, the thing is I don't know, but that is the direction we should be looking in, and I think the exact problem is definitely both identifiable and fixable (even if we have to recreate the maps from scratch. We can with ToEEWB, would only have to use the lighting and clipping files, could do the rest ourselves if neccessary).

    Sorry I have been 'sitting' on this for so long - its just one more thing on my backburner which I meant to get to. I'm not saying its big, but one day they'll have to identify me by my dental records.
    And by lag we mean unmistakable Node lockup even if of short duration, not just performance slowdowns.

    Anybody who wants to start looking into this - glory and honour awaits, whoever fixes this WILL be the Modding King. Tomorrow I will post up the test maps and people can get to it.
     
    Last edited: Jan 22, 2006
  2. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,001
    Likes Received:
    250
    Great stuff Ted and Gaear, this is promising news indeed! Investigations into what causes the lag is the first step towards fixing it - permanantly, Kudos to both of you.
     
  3. Lord_Spike

    Lord_Spike Senior Member Veteran

    Joined:
    Mar 25, 2005
    Messages:
    3,151
    Likes Received:
    1
    A thought...I've always hit wicked lag in level 4; especially the closer I get to Hedrack. Even when that fight's over, and no one is around, I get it on the way to the round room with the Ascomids in it. It seems particularly bad where the face of the demonic figure is set into the floor.
     
  4. Agetian

    Agetian Attorney General Administrator

    Joined:
    Aug 14, 2004
    Messages:
    2,526
    Likes Received:
    0
    The pathnode engine could definitely be causing at least part of the lag, because the pathfinding algorithm in ToEE seems to be highly ineffective, partly due to the fact that the game is half-2D/half-3D (and it's, thus, hard to make good enough code for pathfinding). I suggest you to check if the PND is large enough (let's say past 50-60KB). If it's so, someone could try to refine the path nodes by removing some non-essential ones or re-generating the links with a more rigid tolerance value, and see if that helps. However, it's a double-sided thing though: the less path nodes and the less links, the weirder the pathfinding will be. It could start getting faster, but it will be tougher to navigate on longer distances.

    A suggestion for a starter: replace the nodes' PND file with an empty one (just create a new path node file in ToEEWB and save it, without adding any nodes) and see if this helps. If it does, it may be worth it if someone started building a new navigation file for these maps using TOEEWB's Pathnode Generator.

    Sorry I don't have time to look into it myself, I would have done it personally but I'm busy updating TOEEWB/TOEEFE.

    - Agetian
     
  5. Kalshane

    Kalshane Local Rules Geek

    Joined:
    Aug 6, 2004
    Messages:
    1,653
    Likes Received:
    4
    I hit lag in the 4th level too. Particularly in the area near Hedrack and up in the "North" side of the map where the assorted commanders and Senshock are. It's even worse when I try to go past Hedrack's area. I usually have to dump my graphics setting to absolute crap to not lock up during the fights with the assorted oozes and fungi that are past Hedrack.
     
  6. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,654
    Likes Received:
    352
    Hmmm... but is that, like the Fire Temple, a reflection of the graphic demands of those monsters, or is it Node-like 'don't move the screen while running' style lag?

    Agetian: good idea. I had a bit of a poke at the pathnode files and they look about the size they should be, but since the problem is in there somewhere thats worth investigating.
     
  7. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,001
    Likes Received:
    250
    Re-doing the .mob files should be easy enough to do, time consuming but easy. It's just a matter of listing the x - y co-ordinates and rotations and GUID's for all .mobs, then making new ones and rename them to match the originals.
     
  8. Agetian

    Agetian Attorney General Administrator

    Joined:
    Aug 14, 2004
    Messages:
    2,526
    Likes Received:
    0
    I tried looking at the .MOB files for the nodes, but I gave them only a "surface" look, nothing in-depth. They don't really seem different from .mobs on other maps, so the problem may lie somewhere deeper. However, as you probably know, ToEEWB can't read every single MOB property and field out there, so if someone could point out 3-4 .mob files for me that *definitely* cause lag, I could try looking at them in-depth in order to find out what extra fields and properties they may have in them that could be causing the lag.

    - Agetian
     
  9. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,654
    Likes Received:
    352
    Thats exactly why we need testing. For the record, its not the Guardians + gems: putting in all the mobs EXCEPT those guys still leads to lag.

    Anyways, the test files are up, they're at:

    http://files.co8.org/others/node-repair.zip

    There is a readme in there, just download it (about 220k) and unzip it somewhere then follow the instructions.
     
  10. Kalshane

    Kalshane Local Rules Geek

    Joined:
    Aug 6, 2004
    Messages:
    1,653
    Likes Received:
    4
    This. While the game doesn't lock up for as long as it does in the nodes, I still have time to go get myself a fresh soda and maybe read a page or two in the manual before the game comes back.
     
  11. Lord_Spike

    Lord_Spike Senior Member Veteran

    Joined:
    Mar 25, 2005
    Messages:
    3,151
    Likes Received:
    1
    Ditto; sometimes, even a hard freeze.
     
  12. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,654
    Likes Received:
    352
    While we're tossing around ideas, it may be even easier than that. Simply loading the buggers in and resaving them may do it: whatever the problem is, I dare say it is something NOT supported by ToEEWB and that therefore would get booted out in the re-save.

    Might cause some corruption but I reckon its worth a go, especially since so many of them would be simple ones anyway (Galeb duhrs, elementals, gorgons, Ice Lizards etc - all things with no invetories attached or anything like that).

    A thought: one thing that the 4 nodes and lvl 4 have in common is invisible elementals that switch on when attacked. But I guess they are in the temples in lvls 1 & 2 as well...
     
    Last edited: Jan 22, 2006
  13. Agetian

    Agetian Attorney General Administrator

    Joined:
    Aug 14, 2004
    Messages:
    2,526
    Likes Received:
    0
    No, unfortunately to say it's not a good idea ... :( ToEEWB simply won't load such MOBs that have fields/properties which are not supported. The MOBs that get corrupted have all fields and properties supported, just the way they were saved by the original Worlded in the first place is weird enough to make the ToEEWB codec go haywire. Hard to explain, but once I have the time to update the MOB specs you'll see what is weird there.

    What's worth trying out is checking for those MOBs which simply won't load into ToEEWB. They will mostly be creatures, I believe. Then, it'll be a pain in the butt to figure out all the linked MOBs of course (could take some time with a hex editor), but at least then you'll have the outline of files that definitely HAVE something extra that ToEEWB won't show you. Then, I (or someone else) could analyze these files and see what extra properties are in there, and whether they could be causing the lag or not.

    - Agetian
     
    Last edited: Jan 23, 2006
  14. krunch

    krunch moving on in life

    Joined:
    Aug 9, 2005
    Messages:
    3,280
    Likes Received:
    0
    my 2 cents (okay, maybe 3 cents)

    I've looked at ToEE this last week. Part of the problem is hardware. Part of peoples' problem is whether a video card has its hardware designed to support DirectX version 7, 8, 8.1, or 9 [refer to my hardware recommendation thread, bottom of page 4]. Just having the DirectX 9 version of software is not good enough. Obviously, ToEE will run better with more and better performing memory and will run better with more powerful and faster processors.
    * PS: What i am saying about graphics is that graphics will be displayed better in general with a more DirectX compliant video card...will use newer video drivers better and have a better graphics processor. Please understand I am not saying a better video card will eliminate temple node slowdowns.

    Temple node slowdowns (the so-called lag people refer to) is a situation where the CPU microprocessor on the motherboard experiences a "100 percent CPU usage". Normally, when the ToEE game is running without lag, the CPU runs between zero percent and 15 percent CPU usage and the ToEE.exe process is normal sized. When the lag starts, the CPU usage spikes and toplines remaining at 100 percent usage and the ToEE.exe process becomes extremely large, upwards to or beyond 100 MegaBytes. This can happen when a CPU is doing work where a program requests extremely complex and involved calculations such as transforms or re-mapping complex layered autocad objects.

    The lag occurs when a mouse is moved to the edge of the screen or a party is or moves near the edge of the screen or part of a group of monsters is on the screen [and the rest are off the screen].
    * I suspect the game requests calculations for what objects or monsters are on an adjoining screen or the possible pathes for the same screen between a party and monsters need to be recalculated. Maybe Troika wrote a quick and dirty app to generate the pathes and the generated pathes in the nodes are done poorly, or perhaps, it was a case of sleep deprivation during development.
    ** Lastly, my other remaining thought, are the alogrithms for the temple nodes used to determine pathes different from the alogrithms used in the rest of the game to determine pathes?
     
    Last edited: Jan 23, 2006
  15. Moosehead

    Moosehead Rubber nipple

    Joined:
    Jun 18, 2005
    Messages:
    182
    Likes Received:
    0
    you know, it's funny... i've ever experienced a slowdown in the nodes. but i seem to be the only one.

    the machine i have toee on is an amd barton xp 2500+ underclocked (yup, UNDERclocked) to 2000+ on an ASUS A7V880 mobo with 1 gig of PC3200 memory (2x512mb dual-chan) and a radeon 9800 pro running the latest omega drivers. and win xp sp2 blahblahblah.

    so at least this setup handles ToEE flawlessly (in terms of hardware related probs).
     
Our Host!