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

Offen
#349 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
csharp, unity

Rechercherichtung

Start at GUZ.Core.Services.Npc.NpcAiService.UpdateEnemyNpc and read how it looks up enemies in the currently loaded world. Trace how spawned and visible NPCs are represented, then compare those options with the proposed visibility or range checks. Done means the lookup checks only the intended NPCs and avoids the repeated checks described in the issue.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

improvement

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
Vorherrschende Sprache
C#
Sterne
33
Forks
1
Ø Merge
1 T. 17 Std.
Gemergte PRs (30 T.)
51

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Gothic-Unity-Project/Gothic-Unity

Alle Issues in Gothic-Unity-Project/Gothic-Unity

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.