Skip to content

Game economy: shared income model #23

@robinwils

Description

@robinwils

Description

Implement the shared economy model: shared income from creep sends, private kill rewards, periodic redistribution. No income decay — gold sinks (items, upgrades) regulate inflation. Sending grows the shared economy (everyone benefits), kill rewards are private (better defense = more gold). Income values per creep type defined in data files. Full design doc: docs/architecture/economy.md.

Steps

  • Add Resources component (Gold) and CommonIncome shared state, implement redistribution system (FixedSystem) that pays out common income every N ticks
  • Server-side cost validation: verify affordability before executing BuildTower/SendCreep, deduct cost on success; client-side affordability check for UI feedback
  • Add ResourceUpdateResponse packet, broadcast balance changes and common income rate, serialize Resources in game state snapshot
  • Economy HUD: current gold, common income rate, next payout timer; cost display and greyed-out affordability feedback on tower/creep buttons
  • Pull economy config, creep income values, and tower costs from data definitions (issue Imgui integration rework #11)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gameplayGame mechanics and economyuiHUD, menus, ImGui and UI framework

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions