Data-Driven Entity System Demo #133

Open
opened 2025-12-17 14:01:26 +00:00 by siennathesane · 0 comments
siennathesane commented 2025-12-17 14:01:26 +00:00 (Migrated from github.com)

Description

In order to validate data-driven entity composition in v0,
as a Marathon developer,
I need to create a demo that loads entity definitions from data files and spawns them in the game world with correct components attached.

Acceptance Criteria

Scenario: Entity definitions load from files
  Given entity definition files exist
  When the game starts
  Then entity definitions are loaded into memory

Scenario: Entities spawn from definitions
  Given an entity definition exists
  When a spawn command is executed
  Then an entity is created with correct components

Scenario: Component data loads correctly
  Given an entity definition has component data
  When the entity is spawned
  Then component values match the definition

Scenario: Multiple entity types work
  Given multiple entity definitions exist
  When entities of different types are spawned
  Then each entity has its defined components

Technical Notes

  • Dependencies: #128 (SQLite schema for component storage)
  • Approach:
    • Define entity data file format (YAML, JSON, or RON?)
    • Implement entity definition loader
    • Create entity spawner that attaches components from definitions
    • Test with multiple entity types (e.g., cubes, spheres with different properties)
  • Files affected:
    • New: crates/libmarathon/src/entity/definitions.rs
    • New: crates/libmarathon/src/entity/spawner.rs
    • New: assets/entities/*.yaml (or similar)

Additional Context

Part of v0 Core Tech Validation. Desktop only (macOS). Validates that entities can be defined in data files rather than hardcoded.

## Description In order to validate data-driven entity composition in v0, as a Marathon developer, I need to create a demo that loads entity definitions from data files and spawns them in the game world with correct components attached. ## Acceptance Criteria ```gherkin Scenario: Entity definitions load from files Given entity definition files exist When the game starts Then entity definitions are loaded into memory Scenario: Entities spawn from definitions Given an entity definition exists When a spawn command is executed Then an entity is created with correct components Scenario: Component data loads correctly Given an entity definition has component data When the entity is spawned Then component values match the definition Scenario: Multiple entity types work Given multiple entity definitions exist When entities of different types are spawned Then each entity has its defined components ``` ## Technical Notes - Dependencies: #128 (SQLite schema for component storage) - Approach: - Define entity data file format (YAML, JSON, or RON?) - Implement entity definition loader - Create entity spawner that attaches components from definitions - Test with multiple entity types (e.g., cubes, spheres with different properties) - Files affected: - New: `crates/libmarathon/src/entity/definitions.rs` - New: `crates/libmarathon/src/entity/spawner.rs` - New: `assets/entities/*.yaml` (or similar) ## Additional Context Part of v0 Core Tech Validation. Desktop only (macOS). Validates that entities can be defined in data files rather than hardcoded.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: studio/marathon#133