Refactor: NPC perception rules out of AiHandler, split NpcAiService / NpcHelperService
Mantenedores costumam responder em até 2 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
Start with the design skill and the review findings A3 and A4 from split/09-perceptions; then trace perception handling across AiHandler, NpcAiService, and NpcHelperService. Map the proposed service responsibilities and Reflex registration before implementation. Done means the responsibilities are moved as described with no behavior change; the performance notes are optional.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Follow-up from the review of split/09-perceptions (architecture-reviewer findings A3 + A4).
Problem
AiHandler(adapter, ~720 lines) decides AI rules: loop rate, daily-state check,CallStateEnd, looking away
(ForgetHeroAfterLookingAwaychangesAttitudeTemp),PERC_MOVENPC,PERC_ASSESSBODY. None of it is testable
without a scene, and following one perception means reading AiHandler, NpcAiService and NpcHelperService.NpcAiService(~1,100 lines) andNpcHelperService(~620 lines) each took on a new responsibility: passive
perception broadcast/delivery, the body search, sight lines through alpha-tested polygons,Wld_DetectItem.
Proposal
NpcPerceptionService(new): passive perception broadcast + delivery,ExecutePassivePerception,
FindClosestSensedBody, and the body ofExecuteActivePerceptions(incl.PERC_MOVENPC,PERC_ASSESSBODY,
looking away).NpcSightDomain(new, owned byNpcHelperService):CanSee/CanSense,IsSightBlocked, see-through caches.NpcAiServicekeeps the state lifecycle and also getsCallStateEnd, the loop-rate and daily-state checks.AiHandlerkeeps only the Unity part:_npcPerceptionService.TickPerceptions(NpcData)and the state calls.Wld_DetectItemand the item distances could move to aWld_*/item service.
Plan with the design skill first (new service + Reflex registration), then implement. No behaviour change.
Related performance notes from the same review (can be done during the move):
FindClosestSensedBodywalks the whole NpcCache with a raycast per candidate on every perception tick.Wld_DetectItemwalks the whole VobCache per call.
- Linguagem predominante
- C#
- Estrelas
- 33
- Forks
- 1
- Merge médio
- 1d 21h
- PRs com merge (30d)
- 56
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Gothic-Unity-Project/Gothic-Unity
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 69/100
Gothic-Unity-Project/Gothic-Unity#487 ·
Mantenedores costumam responder em até 2 dias
-
ShadowsAbertafeature
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 30/100
Gothic-Unity-Project/Gothic-Unity#497 ·
Mantenedores costumam responder em até 2 dias
-
Nerf Teleport speedAbertaimprovement
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 42/100
Gothic-Unity-Project/Gothic-Unity#496 ·
Mantenedores costumam responder em até 2 dias
-
feature
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
Gothic-Unity-Project/Gothic-Unity#495 ·
Mantenedores costumam responder em até 2 dias
-
bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 57/100
Gothic-Unity-Project/Gothic-Unity#494 ·
Mantenedores costumam responder em até 2 dias
Todas as issues de Gothic-Unity-Project/Gothic-Unity
Issues semelhantes
-
enhancement needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
microsoft/microsoft-ui-reactor#1460 ·
Mantenedores costumam responder em até 1 dia
-
t/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
dotnet/maui#39950 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
CommunityToolkit/Datasync#600 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
NimblePros/deviq-hugo#121 ·
Mantenedores costumam responder em até 1 dia
-
RANDOM_REPLACE does not keep the date format when the month abbreviation has a trailing periodAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
philterd/phileas-dotnet#188 ·