aether-shards/.cursor/rules/generation/RULE.md
Matthew Mone 5c335b4b3c Add HubScreen and MissionBoard components for campaign management
Introduce the HubScreen as the main interface for managing resources, units, and mission selection, integrating with the GameStateManager for dynamic data binding. Implement the MissionBoard component to display and select available missions, enhancing user interaction with mission details and selection logic. Update the GameStateManager to handle transitions between game states, ensuring a seamless experience for players. Add tests for HubScreen and MissionBoard to validate functionality and integration with the overall game architecture.
2025-12-31 10:49:26 -08:00

904 B

description globs
Standards for map generation, seeding, and textures. src/generation/*.js**

Procedural Generation Standards

Core Principles

  1. Determinism: All generators must accept a seed. Using the same seed must produce the exact same map and textures. Use src/utils/SeededRandom.js.
  2. Additive vs Subtractive:
    • Ruins: Use Additive (Fill 0, Build Rooms).
    • Caves: Use Subtractive/Cellular (Fill 1, Carve Caves).
  3. Playability:
    • Always run PostProcessor.ensureConnectivity() to prevent soft-locks.
    • Always ensure valid "Floor" tiles exist for spawning.

Texture Generation

  • Use OffscreenCanvas for texture generation to support Web Workers.
  • Return a composite object (diffuse, normal, roughness) for PBR materials.
  • Output textures to generatedAssets object, do not apply directly to Three.js materials inside the generator.