1. Home
  2. Docs
  3. Quest System
  4. Starter Guides
  5. Performance Guidelines

Performance Guidelines

It can happen that a large number of quests and poor management can lead to performance problems. These problems are easy to avoid, I am listing here what can should be avoided and be taken care of.

  • Limit the max quest amount

    More active quests result in larger loops, therefore the maximum of active quests should be in an acceptable range.

  • Unbind dispatcher

    The example NPC´s bind the dispatcher "OnRepActiveQuests" on BeginPlay.
    The function that is called by it is very expensive and has only cosmetic effects, so the dispatcher should be unbound if the player is not in range and bound again when he comes closer.

  • Reduce Netload

    Reduce the amount of data that needs to be replicated.
    For example, the quest descriptions are currently being replicated. They do not change, so they can be saved in a separate data table and only loaded when they are needed, if your quest texts are really long (use the QuestID to load it in widgets).

  • Limit Quest Task Updates

    Calling "AddQuestTaskAmount" won't have a big impact on performance when the task is not in the questlog. If the task is in one of the active quests it will cause small CPU Load. If you call it a multiple times in a short period it can add up to huge performance loss.

    For example a quest that requires to deal 1000 damage should not call "AddQuestTaskAmount" every time the player deals damage. Instead you should save how much damage the player dealed in e.g. last 5 seconds and then update it once).

  • NPC and Available Quests

    Do not load every quest on every NPC in the world. Only load Quests that are necessary (acceptable/completable by this NPC) or the loop count will increase and that can cause performance loss.

How can we help?