Hey Azazel, Let's Talk Triggers

Discussion in 'NOTD Discussion' started by Lord NiteShade, May 2, 2012.

  1. Lord NiteShade
    • Wiki Founder
    • Community Leader

    Lord NiteShade NOTD Staff: Wiki Founder/TeamSpeak Admin

    So, with Blaqk unlocking the old forum, I once again got access to my old notes from Xenomorph. God bless him. Now, I've taken the liberty of extracting the NOTD map from my cache, and have run it through the editor's debugger. The results are interesting, if not ultimately disappointing.

    Below are a serious of graphics of the trigger activity as I played through a single player match, on Recruit Difficulty (Local player has no bank information to read.)

    [​IMG]

    The scale on these graphs is all relative. That Massive spike is immediately after storyline is selected. A grand total of 210 events (more with additional players) are firing simultaneously. This includes, everything. This huge spike is the primary cause for the tremendous lag at the start of every match, and the primary reason so many players drop.

    [​IMG]

    Here's the Mining Colony Download, which is a flurry of activity. Most of it is spawning all kill related, but there's a good bit of ai related triggers going on as well. I'm unsure what the spike is, but I assume it's the download completing.

    [​IMG]

    Here's the airlock battle. It's not "as bad" as it looks. If you notice it peaked at 70, which is more or less average for the map. The first two images peaked much higher. The narrow spike in the middle is the door opening, and all the necessary triggers for the airlock hordes firing off.

    [​IMG]

    Here's the Erebos cutscene and battle. Notice the large number of trigger errors caused during the cinematic (this is why players lag and occasionally drop during it). The first big spike is all the units spawning during the cutscene, and the ai needed to move them. It drops down somewhat, but the second spike is the baneling and door explosion. Afterwards is all of Erebos' battle with his AI, his spore bomb AI, and his retreat function. When it finally returns to normal about 2/3 through the image is after erebos is defeated and he has gone into his idle state until chapter 2.

    [​IMG]

    Here's Erebos's hordes, the high peaks towards the beginning and end are mostly caused by the AI, as well as the dropship ammo drop triggers.

    [​IMG]

    Here's the chapter 2 cutscene. That massive block of red is a huge number of errors during the initial cutscene. The periodic high points are the spawn triggers for the passive spawn creating units.

    [​IMG]

    Here's the second battle with Erebos, each high spike of red is when Erebos changes colors. The largest spike at the end is his death and all the related triggers that fire or end as a result.

    [​IMG]

    Here's the Black Ops battle, each red spike in activity is the AI trying to target and use the gunship strike. The Highest spike towards the center of the activity is the Queen spawning getting many of her related triggers.

    [​IMG]

    Here's the Queen battle. That massive block of red is an absurd amount of triggers firing, all dictating the spawns as well as the AI of the hordes, the Queen, and Charlie co. Its the reason that battle lags so fiercely. And it only gets worse with more enemies.

    [​IMG]

    Here's the death of the Queen, notice the insane spike as she dies. It's a ridiculous number of events firing, revolving around victory, spawning, ai, and awarding players. It's easily one of the laggiest parts in the entire game.[hr]

    [​IMG]

    Continuing directly from that last image. You can still see the Queen's death at the left portion. That enormous pile of activity is both the endgame cutscene and the score screen. There is a massive number of dialog errors here which account for most of the lag during this period. There's also a lot of triggers that break when all units are removed from the map.

    [​IMG]

    Here's an Endgame summary of the triggers. That first one, the 40,000, thats the Team UI. Those "Boss HP changes" are the UI's health bars. They update literally constantly, regardless if there is/is not a change. It's got to be the single biggest performance drag on the entire map. The second is the check for critical injury. I'm not sure why that fired 10 times, as I didn't die (I set myself to immortal). I assume it must have triggered for other terran infantry (civs, Minis, ect) or even Heroic units such as bosses. However, obviously none of these units can be "critically injured" so I'm unsure what happened there. Third highest is the evasion AI for the Minis. Despite the name, I assume this AI applies to the 3 mining co minis, as well as Olgivy, Sec team survivors, and charlie co. Remember that charlie company predates the other ai, so that trigger is quite old.

    What does all this mean?
    It means what we already knew. It means theres periods during the game when there are MASSIVE spikes in lag. This is never created by sheer numbers of AI, but rather all the triggers needed to support them. In some occasions high numbers of errors create this lag. It also tells me serious revision will need to occur to the map's triggers if performance, and playability ever wish to increase.

    Note that this was a solo game, on recruit, lasting 37 minutes. I shudder to think what a full game on Nightmare looks like. I will update more later as I come across it.
  2. Blaqk
    • Development Team
    • Webmaster/Liaison

    Blaqk NOTD Staff: Bugs, Pugs, and Scruggs

    Fixit, Nite! Fixit!
  3. Diode

    Diode Well-Known Member

    Can't fix nothing if you don't have the map to do so.
  4. Lord NiteShade
    • Wiki Founder
    • Community Leader

    Lord NiteShade NOTD Staff: Wiki Founder/TeamSpeak Admin

    Here's all the errors I got just loading the map up.

    [​IMG]

    [​IMG]

    Here's the art files. There's a large number of unused buttons and icons. Let me ask this, is we are so "desperate for map space." Why not simply remove these unused icons? Here's what they look like for those interested.

    [​IMG]
  5. Diode

    Diode Well-Known Member

    That is just actors.
  6. Froblock

    Froblock Well-Known Member

  7. Diode

    Diode Well-Known Member

    Dark ages are coming. :(
  8. Blaqk
    • Development Team
    • Webmaster/Liaison

    Blaqk NOTD Staff: Bugs, Pugs, and Scruggs

    I cautioned him a long time ago about it but those images are pushing the line.

    A couple of years ago Dead Frontier got into some legal shit because they were using names and likenesses of real world weapons without permission.

    HK in HK420 can be construed as Heckler & Koch and using actual likenesses is just asking for trouble. Trust me, I've done all of this shit before.

    <--- has actual experience
  9. Blaqk
    • Development Team
    • Webmaster/Liaison

    Blaqk NOTD Staff: Bugs, Pugs, and Scruggs

    For the record, it was indeed Heckler & Koch along with Fabrique Nationale de Herstal who dropped the hammer.
  10. Diode

    Diode Well-Known Member

    Things need to be cited and reference somewhere on where everything was received. Even as a second, third sources still needs to be somewhere.
  11. Lord NiteShade
    • Wiki Founder
    • Community Leader

    Lord NiteShade NOTD Staff: Wiki Founder/TeamSpeak Admin

    Look what I found.
    [​IMG]

    The Gravity Gun, despite being "removed" is also this in there, and fully functional. Triggers copy paste like shit, but here's its Pull command.
    It's too much of a hassle to copy the rest, and it looks like gibberish outside the editor. Wasn't the Grav Gun supposedly removed to save space?
  12. Mirage
    • Donator

    Mirage ಠ_ಠ What are you looking at?

    The images don't take up that much of the maps space; and the issue is 'script' space, not image space at all; and maybe the gravity gun stuff is still there because ability has an idea to recycle it possibly; who knows.
  13. Lord NiteShade
    • Wiki Founder
    • Community Leader

    Lord NiteShade NOTD Staff: Wiki Founder/TeamSpeak Admin

    Correct, but space is space. We were literally "out" yet these unused images didn't get the boot?

    As for the Grav Gun, it is NOT difficult to move content to a new map, to store it for later. Peera does this all the time with his various workshops. It's more or less standard practice.
  14. Mirage
    • Donator

    Mirage ಠ_ಠ What are you looking at?

    Considering the map size limit is 20 mb (we're at 4~ right now)... No space isn't just space in this case, we're trying to pinch virtual machine addressing space here (Thus where the scripts run) and the bigger hits on that are fixed strings within the scripts that aren't externalized.
  15. Blaqk
    • Development Team
    • Webmaster/Liaison

    Blaqk NOTD Staff: Bugs, Pugs, and Scruggs

    Last time I downloaded NOTD it jumped to 6MB.

    Either way, let's not turn this into an argument thread. We're here to help Ability, not fling shit at each other.
  16. Mirage
    • Donator

    Mirage ಠ_ಠ What are you looking at?

    Either way, nowhere near 20mb; but still at some point you hit a dead end on script space eventually with a game as comprehensive as NOTD is (too many campaigns in a single map in my opinion) for NOTD2 it needs to be split up and tied to the backend NOTD2 stuff via a mod to handle the similarities.
  17. Ability
    • Development Team
    • NOTD Creator

    Ability NOTD Creator

    Still at work atm. Agree that a lot of the trigger work can be optimized. Are people still having major lag issues in games? Single player with debugger is a bit laggy.
  18. Ghost
    • Warden

    Ghost Warden

    Last I checked I still get spikes after tart dies (perf bonus), after ere1 fight (I don't know but I have a real bad feeling), when dome c starts, when black ops talking head appears.

    Btw from the first screenshot I think that answers my question whether weapon splash mods work..
  19. Lord NiteShade
    • Wiki Founder
    • Community Leader

    Lord NiteShade NOTD Staff: Wiki Founder/TeamSpeak Admin

    Most of the weapon Mod triggers break immediately. I think only damage, range, and attack speed function properly. Also, there was a fairly significant spike after tart, but I fired a shiva at him, so taking a picture was pretty pointless.
  20. Ghost
    • Warden

    Ghost Warden

    Pretty sure weight works (was upped to 7.5 per pt too and idk seems slower) and reload (definitely pistol even takes a while now) too as well as switch time (pretty sure) since those are currently my -mods.
    Guess I shall move my last 2 mods into splash :D

Share This Page