Skip to content

Coding Standards

Authoritative Style Guide

Andromeda follows Epic's C++ Coding Standard for Unreal Engine 5.7:

https://dev.epicgames.com/documentation/unreal-engine/epic-cplusplus-coding-standard-for-unreal-engine?application_version=5.7

When local preferences conflict with Epic's Unreal C++ style, prefer Epic's standard unless there is a documented project-specific reason to differ.

Architecture Principle

Use this split:

C++ defines the rules. Blueprints define content and presentation. Data assets define salvage data.

This keeps core behavior maintainable while leaving Unreal content iteration fast.

C++ Responsibilities

Use C++ for:

  • interaction interfaces and reusable components
  • salvage item data structures
  • scanner logic
  • station processing rules
  • save/load systems
  • consequence/event systems
  • shared gameplay contracts

Blueprint Responsibilities

Use Blueprints for:

  • actor setup and content variants
  • level composition
  • widget layout and styling
  • asset references
  • presentation-only hooks such as one-off animation, audio, or VFX triggers
  • animation timelines when they are presentation-only

Avoid Blueprint Event Graphs for core gameplay and UI behavior. For the vertical slice, widget behavior is C++ owned:

  • C++ populates prompt, scan, and result widgets.
  • C++ handles scanner UI buttons.
  • C++ handles input-mode transitions while UI is open.
  • Widget Blueprints provide named Designer widgets through BindWidget/BindWidgetOptional.

Do not put core game rules, scanner decisions, processing outcomes, or primary UI data binding only in Blueprint graphs.

Use Blueprint presentation hooks sparingly when the C++ system explicitly exposes one.

Previous broader Blueprint uses such as:

  • animation timelines
  • quick prototype wiring

are acceptable for temporary experiments, but should be migrated to C++ once they become part of the maintained vertical slice.

Data Responsibilities

Use Data Assets or Data Tables for:

  • salvage item metadata
  • manifest claims
  • scan profiles
  • legal handling rules
  • payouts
  • consequences
  • story flags

The first implementation may use a simple data model, but it should be shaped so more salvage items can be added without rewriting scanner logic.

Naming

Project C++ types should use the Andromeda prefix when they are game-specific:

  • IAndromedaInteractableInterface
  • UAndromedaInteractableComponent
  • AAndromedaSalvageItem
  • AAndromedaScanner
  • UAndromedaSalvageItemData
  • FAndromedaScanProfile
  • FAndromedaProcessingRule

Avoid generic names such as UInteractionComponent unless the code is truly engine/plugin-generic.

Content assets live under Content/Andromeda, so asset names do not need to repeat Andromeda unless it improves search clarity. Prefer role names:

  • BP_PlayerCharacter
  • BP_PlayerController
  • BP_SalvageBayGameMode
  • BP_Scanner
  • WBP_ScanResult
  • DA_DamagedReactorCoil

Use L_ for level assets. Reserve M_ for materials.

Scope Control

Prefer small systems with clean extension points over large speculative frameworks.

Do not build:

  • inventory complexity before the slice needs it
  • faction systems before item consequences need them
  • procedural generation before authored items work
  • runtime AI NPC systems for the MVP
  • combat systems

Code Quality

Expected standards:

  • clear ownership of gameplay state
  • minimal global state
  • no throwaway level-only rules for core gameplay
  • small functions with explicit names
  • comments only where they clarify non-obvious intent
  • editor-exposed properties grouped with useful categories
  • Blueprint-callable APIs only where presentation or content wiring needs them

Testing and Verification

For early Unreal work, verification is mostly compile and in-editor play testing.

Before committing gameplay code:

  • compile the project
  • check editor startup
  • run a short play-in-editor test
  • verify logs for relevant errors
  • confirm generated files are not staged