Skip to content

[LOW] Expand module-level documentation for complex systems #270

@MichaelFisher1997

Description

@MichaelFisher1997

Problem

While the codebase has good function-level documentation (/// comments), some complex systems lack module-level documentation (//!) explaining the overall architecture, design decisions, and usage patterns.

Modules Needing Better Documentation

1. World Streaming System

  • How chunks flow through states (missing -> generating -> meshing -> renderable)
  • Interaction between WorldStreamer, JobSystem, and WorldRenderer
  • Thread safety considerations

2. RHI Architecture

  • Relationship between RHI, Vulkan backend, and RenderDevice
  • How the segregated interfaces work together
  • Resource lifetime management

3. LOD System

  • How LOD0/LOD1/LOD2/LOD3 differ
  • Relationship between LODManager and LODRenderer
  • GPU data management for LOD

4. Render Graph

  • How passes are ordered and executed
  • Main pass lifecycle
  • Pass dependencies

5. Job System

  • Job prioritization strategy
  • Worker thread lifecycle
  • Reprioritization mechanism

Current State

Most files have minimal or no module-level documentation:

Proposed Solution

Add comprehensive module-level documentation (//!) to complex modules:

Benefits

  • Faster onboarding for new developers
  • Clearer understanding of system interactions
  • Documentation stays in sync with code
  • Better long-term maintainability

Acceptance Criteria

  • Module docs for world_streamer.zig
  • Module docs for rhi.zig explaining architecture
  • Module docs for lod_manager.zig and lod_renderer.zig
  • Module docs for render_graph.zig
  • Module docs for job_system.zig
  • Review and improve existing module docs

Related Files

  • src/world/world_streamer.zig
  • src/engine/graphics/rhi.zig
  • src/world/lod_manager.zig
  • src/world/lod_renderer.zig
  • src/engine/graphics/render_graph.zig
  • src/engine/core/job_system.zig

Estimated Effort

Low (documentation only, no code changes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions