Skip to content

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

@JaXt0r

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementOptimize an existing feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions