Mateus Rodrigues 7d83dd800f feat(attributes): cliente Fase 1 — sub-modulo ZMMOAttributes + HUD HP/SP
Espelho do AttributeSystem do servidor (Game/MMO/Modules/AttributeSystem).
Sub-modulo C++ Source/ZMMOAttributes/ (Runtime, LoadingPhase=PreDefault)
isolando o cliente do AttributeSystem em pasta propria — pavimentando o
caminho para futuros Inventory/Skills/Combat virem como sub-modulos peer.

Componentes:
  - FZMMOAttributesSnapshot (USTRUCT Blueprint, espelha
    FZeusAttributesPayload do plugin ZeusNetwork)
  - UZMMOAttributeComponent (UActorComponent ligado ao player):
    ApplySnapshot / ApplyHpSpUpdate / NotifyLevelUp + 3 delegates
    dinamicos (OnAttributesChanged / OnHpSpChanged / OnLevelUp) +
    helpers GetHpRatio / GetSpRatio
  - UZMMOAttributeNetworkHandler (UWorldSubsystem): ponte
    UZeusNetworkSubsystem -> componente via lookup por EntityId
  - UZMMOHudHpSpWidget (UUserWidget base): BindWidget (HpBar, SpBar) +
    BindWidgetOptional (HpText, SpText, LevelText). NativeConstruct
    binda nos delegates do componente; NativeDestruct desliga.
    OnSnapshotApplied / OnHpSpDelta (BlueprintNativeEvent) com impl
    C++ atualizando progress bars e textos.

Integracao no PlayerCharacter:
  - CreateDefaultSubobject<UZMMOAttributeComponent> no ctor
  - HudHpSpWidgetClass (TSubclassOf) resolvido via
    ConstructorHelpers::FClassFinder em /Game/ZMMO/UI/HUD/WBP_HUD_HpSpBar
  - HandleLocalSpawnReady seed do EntityId no componente + spawn do HUD
    (CreateWidget + AddToViewport + BindToAttributeComponent)
  - EndPlay remove widget do parent

WBP_HUD_HpSpBar (UMG, criado via MCP):
  - Overlay root + SizeBox (320x120) + VerticalBox
  - 5 widgets BindWidget: LevelText, HpBar (vermelho), HpText,
    SpBar (azul), SpText
  - Herda de UZMMOHudHpSpWidget

Verificacao (smoke test):
  - PIE login -> server envia S_ATTRIBUTE_SNAPSHOT_FULL
  - Cliente recebe via OnAttributeSnapshotFull -> handler roteia pra
    componente do entity -> ApplySnapshot dispara OnAttributesChanged ->
    widget atualiza ProgressBars + TextBlocks
  - HUD aparece no canto inferior esquerdo da tela com valores
    correspondentes ao DB

Refs:
  - Plano: C:/Users/mateu/.claude/plans/temos-uma-lab-input-nested-diffie.md
  - Server companion commit: feat(attributes): AttributeSystem modular

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 04:00:32 -03:00
2026-05-07 20:17:53 -03:00

ZMMO — Cliente Unreal Zeus MMO

Cliente Unreal Engine 5.7 do projecto Zeus. Implementa o pipeline "cliente solto + servidor valida input/velocidade" definido em ADR 0038 (landscape autoritativo no cliente; servidor reservado para colisao de objectos).

Arquitectura

  • Source/ZMMO/Game/Entity/IZMMOEntityInterface, AZMMOEntity, AZMMOPlayerCharacter (local, CMC livre), AZMMOPlayerProxy (remoto, snapshot-only).
  • Source/ZMMO/Game/Controller/AZMMOPlayerController com Enhanced Input + virtual joystick opcional.
  • Source/ZMMO/Game/Modes/AZMMOGameMode e UZMMOGameInstance (auto-connect ao servidor Zeus em Init).
  • Source/ZMMO/Game/Network/UZMMOWorldSubsystem (registry EntityId -> AActor*, dispatch dos delegates do UZeusNetworkSubsystem).

Dependencias

  • Unreal Engine 5.7
  • Plugin ZeusNetwork (do projecto servidor, em Server/Plugins/Unreal/)
  • Plugin ZeusMapTools (editor-only, opcional)

Smoke test

  1. Servidor Zeus a correr em 127.0.0.1:27777.
  2. Abrir ZMMO.uproject, aguardar build do modulo ZMMO.
  3. PIE: confirmar [Zeus] Connected to server 127.0.0.1:27777 no Output Log e o spawn do pawn local com EntityId autoritativo.

Configuracao

  • bAutoConnectOnStart (default true) em UZMMOGameInstance. Desligar quando existir UI de login.
  • Config/DefaultEngine.ini aponta GlobalDefaultGameMode=/Script/ZMMO.ZMMOGameMode.
Description
No description provided
Readme 80 MiB
Languages
C++ 93.1%
C 5.2%
C# 1%
Python 0.5%
PowerShell 0.2%