Skip to content

Performance: Check for Enemy in range is checking all! from the currently loaded world #349

Description

@JaXt0r

Description

GUZ.Core.Services.Npc.NpcAiService.UpdateEnemyNpc

// FIXME - Performance - Can we clean this up to support only spawned and visible NPCs/Monsters?
//         Otherwise we might need to loop through it for each visible monster and 1000x per visible NPC/Monster
//         -> about 10k checks per frame!

TODOs

  • Optimize lookup to check only
    • Visible NPCs
    • and/or NPCs within certain range

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementOptimize an existing feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions