### Start Local Web Server with basic-http-server Source: https://github.com/cleder/brkrs/blob/develop/specs/004-pause-system/quickstart.md Install and start a local HTTP server using the `basic-http-server` tool. This is an alternative to Python's http.server for serving the WASM build. ```bash cargo install basic-http-server basic-http-server . ``` -------------------------------- ### Quickstart Validation Steps Source: https://github.com/cleder/brkrs/blob/develop/specs/024-level-navigation-bricks/tasks.md Execute quickstart validation steps and ensure the correct level (014) is referenced for manual testing. ```markdown specs/024-level-navigation-bricks/quickstart.md ``` -------------------------------- ### Set Up Python Virtual Environment and Install Dependencies Source: https://github.com/cleder/brkrs/blob/develop/specs/001-sphinx-docs/quickstart.md Create and activate a Python virtual environment, then install project dependencies using pip. ```bash python -m venv .venv source .venv/bin/activate pip install -U pip setuptools pip install -r docs/requirements.txt ``` -------------------------------- ### Clone and setup repository Source: https://github.com/cleder/brkrs/blob/develop/docs/contributing.md Initial commands to clone the repository and navigate to the project directory. ```bash git clone https://github.com/YOUR_USERNAME/brkrs.git cd brkrs ``` -------------------------------- ### Parallel Setup Tasks Source: https://github.com/cleder/brkrs/blob/develop/specs/004-pause-system/tasks.md These bash commands represent tasks that can be executed in parallel during the initial setup phase of the project. ```bash # Launch all setup tasks together: Task: "Create src/pause.rs module file" Task: "Create src/ui/ directory" Task: "Create src/ui/pause_overlay.rs module file" Task: "Create src/ui/mod.rs" Task: "Add pub mod pause to src/lib.rs" Task: "Add pub mod ui to src/lib.rs" ``` -------------------------------- ### Build documentation locally Source: https://github.com/cleder/brkrs/blob/develop/docs/faq.md Install dependencies and generate HTML documentation files. ```bash cd docs pip install -r requirements.txt make html ``` -------------------------------- ### Level Configuration Example (RON) Source: https://github.com/cleder/brkrs/blob/develop/specs/001-complete-game/quickstart.md Example of a level configuration file in RON format, defining level properties, grid size, and brick types. ```ron // assets/levels/level_001.ron Level( number: 1, grid: Grid(width: 22, height: 22), bricks: [ Brick(pos: (0, 0), type: Standard), Brick(pos: (1, 0), type: MultiHit(durability: 2)), // Add more bricks... ], ) ``` -------------------------------- ### Start Local Web Server with Python Source: https://github.com/cleder/brkrs/blob/develop/specs/004-pause-system/quickstart.md Start a local HTTP server using Python 3 to serve the WASM build. This is a common method for local web testing. ```bash python3 -m http.server 8080 ``` -------------------------------- ### Example Complete Audio Manifest Source: https://github.com/cleder/brkrs/blob/develop/assets/audio/README.md A comprehensive example of the `manifest.ron` file, illustrating mappings for various collision and event sounds. Filenames are relative to the `assets/audio/` directory. ```rust AudioManifest( sounds: { // Collision sounds BrickDestroy: "impact_brick_shatter.ogg", MultiHitImpact: "impact_brick_thud.ogg", WallBounce: "impact_wall_bounce.ogg", PaddleHit: "impact_paddle_hit.ogg", // Paddle edge cases PaddleWallHit: "paddle_wall_collision.ogg", PaddleBrickHit: "paddle_brick_collision.ogg", // Level events LevelStart: "level_start_chime.ogg", LevelComplete: "level_complete_fanfare.ogg", // UI feedback UiBeep: "ui_error_beep.ogg", } ) ``` -------------------------------- ### Install C Compiler (Fedora) Source: https://github.com/cleder/brkrs/blob/develop/specs/001-complete-game/quickstart.md Install the C compiler on Fedora systems to resolve linker errors. ```bash sudo dnf install gcc ``` -------------------------------- ### Parallel Execution Examples per User Story Source: https://github.com/cleder/brkrs/blob/develop/specs/001-textured-visuals/tasks.md Examples of concurrent development tasks for specific user stories. ```text US1: Run `tests/texture_manifest.rs` (T008) while another dev completes `src/systems/textures/materials.rs` updates (T010). ``` ```text US2: Build `TypeVariantRegistry` (T015) simultaneously with integration tests (T014) to validate behavior early. ``` ```text US3: One contributor updates level schemas (T020) as another implements hot-reload logic (T022). ``` ```text US4: Develop the `LevelSwitchRequested` event (T025) while a teammate authors the `/levels/next` tooling shim (T027). ``` -------------------------------- ### Install C Compiler (Ubuntu/Debian) Source: https://github.com/cleder/brkrs/blob/develop/specs/001-complete-game/quickstart.md Install the C compiler and essential build tools on Ubuntu/Debian systems to resolve linker errors. ```bash sudo apt install build-essential ``` -------------------------------- ### Usage Pattern Examples Source: https://github.com/cleder/brkrs/blob/develop/specs/024-level-navigation-bricks/contracts/events.md Illustrates how to emit and consume the LevelSwitchRequested message within Bevy systems. ```APIDOC ### Usage Pattern #### Emitting LevelSwitchRequested (e.g., in brick collision system) ```rust use bevy::prelude::*; use bevy::ecs::message::MessageWriter; // Assuming BRICK_50 and BRICK_54 are defined constants const BRICK_50: u8 = 50; const BRICK_54: u8 = 54; fn handle_navigation_brick_collision( brick_type: u8, mut level_switch_writer: MessageWriter, ) { match brick_type { BRICK_50 => { // Level Up brick: advance to next level level_switch_writer.write(LevelSwitchRequested { source: LevelSwitchSource::Brick, direction: LevelSwitchDirection::Next, }); } BRICK_54 => { // Level Down brick: return to previous level level_switch_writer.write(LevelSwitchRequested { source: LevelSwitchSource::Brick, direction: LevelSwitchDirection::Previous, }); } _ => {} } } ``` #### Consuming LevelSwitchRequested (e.g., in level switch consumer system) ```rust use bevy::prelude::*; use bevy::ecs::message::MessageReader; // Assuming LevelSwitchState, CurrentLevel, force_load_level_from_path, spawn_victory_screen are defined elsewhere fn process_level_switch_requests( mut requests: MessageReader, mut switch_state: ResMut, current_level: Option>, mut commands: Commands, // Assuming commands is needed for spawning mut game_progress: ResMut, // Assuming GameProgress is a resource ) { for request in requests.read() { let current_number = current_level.map(|c| c.0.number).unwrap_or(0); match request.direction { LevelSwitchDirection::Next => { if let Some(next_level) = switch_state.next_level_after(current_number) { // Load next level force_load_level_from_path(&next_level.path, /* ... */); } else { // On final level: show victory screen if request.source == LevelSwitchSource::Brick { spawn_victory_screen(&mut commands); game_progress.finished = true; } } } LevelSwitchDirection::Previous => { if let Some(prev_level) = switch_state.previous_level_before(current_number) { // Load previous level force_load_level_from_path(&prev_level.path, /* ... */); } // If on level 1: no-op (already handled by None check) } } } } ``` ``` -------------------------------- ### Example debug log output Source: https://github.com/cleder/brkrs/blob/develop/specs/004-pause-system/quickstart.md Sample output showing pause and resume state transitions. ```text [INFO] Pause activated: ESC pressed [INFO] Window mode: BorderlessFullscreen -> Windowed [INFO] Physics pipeline: active=false [INFO] Pause overlay spawned ... [INFO] Resume activated: Mouse click [INFO] Window mode: Windowed -> BorderlessFullscreen [INFO] Physics pipeline: active=true [INFO] Pause overlay despawned ``` -------------------------------- ### Level Configuration Examples Source: https://github.com/cleder/brkrs/blob/develop/specs/022-paddle-destroyable-brick/quickstart.md RON-formatted level files used for testing paddle-destroyable brick behavior. ```ron ( ball: [(0.0, 15.0, 0.0)], paddle: [(0.0, 0.0, -15.0)], bricks: [ (brick_type: 57, position: (0.0, 0.0, -10.0), rotation: (0.0, 0.0, 0.0)), ], ) ``` ```ron ( ball: [(0.0, 15.0, 0.0)], paddle: [(0.0, 0.0, -15.0)], bricks: [ (brick_type: 57, position: (-5.0, 0.0, -10.0), rotation: (0.0, 0.0, 0.0)), (brick_type: 57, position: (0.0, 0.0, -10.0), rotation: (0.0, 0.0, 0.0)), (brick_type: 57, position: (5.0, 0.0, -10.0), rotation: (0.0, 0.0, 0.0)), ], ) ``` ```ron ( ball: [(0.0, 15.0, 0.0)], paddle: [(0.0, 0.0, -15.0)], bricks: [ (brick_type: 57, position: (0.0, 0.0, -15.0), rotation: (0.0, 0.0, 0.0)), // Same Z as paddle! ], ) ``` -------------------------------- ### Level with Description Only RON Example Source: https://github.com/cleder/brkrs/blob/develop/specs/007-level-metadata/data-model.md An example of a RON file for LevelDefinition that includes the description field. ```ron LevelDefinition( number: 42, description: Some("Classic corridor layout testing precision"), matrix: [ // ... matrix data ], ) ``` -------------------------------- ### Missing Asset Warning Example Source: https://github.com/cleder/brkrs/blob/develop/specs/006-audio-system/quickstart.md Example of the warning message logged when an audio file is missing. ```text WARN brkrs::systems::audio: Audio asset missing for BrickDestroy ``` -------------------------------- ### Rust function documentation example Source: https://github.com/cleder/brkrs/blob/develop/docs/contributing.md Example of a documented Rust function following project standards. ```rust /// Spawns a brick entity at the given grid position. /// /// Use this function when loading levels to create brick entities /// from the level matrix. The brick type determines which components /// are attached. /// /// # Panics /// /// Panics if `grid_pos` is outside the 20x20 grid bounds. pub fn spawn_brick(commands: &mut Commands, grid_pos: (usize, usize), brick_type: u8) { // implementation } ``` -------------------------------- ### Build Documentation with Make Source: https://github.com/cleder/brkrs/blob/develop/specs/007-level-metadata/quickstart.md Use this command to build the HTML documentation. Ensure you are in the 'docs' directory. ```bash cd docs make html ``` -------------------------------- ### Gravity Override Examples Source: https://github.com/cleder/brkrs/blob/develop/assets/levels/README.md Provides examples of how to define custom gravity vectors in level definitions. ```APIDOC ### Gravity Override Examples The `gravity` field is optional and allows per-level physics customization: ```rust // No gravity override (uses default global gravity) gravity: None, // Custom gravity vector gravity: Some((2.0, 0.0, 0.0)), // Pulls toward +X (right) gravity: Some((-1.0, 0.0, 1.0)), // Diagonal pull gravity: Some((0.0, -9.81, 0.0)), // Standard downward gravity ``` ``` -------------------------------- ### Tracing Span Output Example Source: https://github.com/cleder/brkrs/blob/develop/specs/026-direction-bricks/contracts/observer-event.md Example of the structured log output generated by the direction_brick_effect tracing span. ```text direction_brick_effect{brick_type=45 ball_entity=Entity { index: 3, generation: 1 } velocity_before=[3.0, 2.0, 0.0] velocity_after=[8.0, 2.0, 0.0] points=75}: direction_brick_effect: Direction brick impulse applied ``` -------------------------------- ### Setting up Bevy Test Fixtures Source: https://github.com/cleder/brkrs/blob/develop/specs/023-brick-42-91-life-loss/tasks.md Use `World::default()`, insert necessary components, and run systems in isolation to set up test fixtures. This pattern is common in existing brick tests. ```rust let mut world = World::default(); world.insert_resource(MyResource { value: 10 }); // Run systems... ``` -------------------------------- ### Install Flamegraph for Profiling Source: https://github.com/cleder/brkrs/blob/develop/specs/001-indestructible-bricks/perf.md Installs the flamegraph tool on Linux systems. This is a prerequisite for manual CPU profiling. ```bash cargo install flamegraph ``` -------------------------------- ### Create Example Level File Source: https://github.com/cleder/brkrs/blob/develop/specs/007-level-metadata/quickstart.md A template for a new level file (e.g., level_999.ron) demonstrating metadata usage. ```ron LevelDefinition( number: 999, description: Some(r#" Example level demonstrating metadata fields. This level shows how to document design intent and provide contributor attribution. "#), author: Some("[Brkrs Contributors](https://github.com/cleder/brkrs)"), matrix: [ [90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90], [90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,90], [90, 0,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, 0,90], [90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,90], // ... 16 more rows ], ) ``` -------------------------------- ### Parallel Implementation Example Source: https://github.com/cleder/brkrs/blob/develop/specs/025-ball-spawn-bricks/tasks.md Illustrates how three developers can work simultaneously on different user stories (Red 1, Red 2, Red 3 bricks) after foundational tasks are complete. ```text Developer A: Implements US1 (Red 2 brick) - Tasks T009-T024 Developer B: Implements US2 (Red 3 brick) - Tasks T025-T037 Developer C: Implements US3 (Red 1 brick) - Tasks T038-T049 All three can work simultaneously after Phase 2 completes (T004-T008). Each developer commits their tests (red phase), gets approval, implements (green phase). ``` -------------------------------- ### Build Sphinx Site and Stage Rustdoc Source: https://github.com/cleder/brkrs/blob/develop/specs/001-sphinx-docs/quickstart.md Clean the previous build, copy rustdoc artifacts into the Sphinx static directory, build the Sphinx site, and serve it locally for preview. ```bash # from repository root rm -rf docs/_build # copy rustdoc into docs/_static/rustdoc (example) mkdir -p docs/_static/rustdoc cp -r target/doc/* docs/_static/rustdoc/ # build the Sphinx site sphinx-build -b html docs/ docs/_build/html # open the site python -m http.server --directory docs/_build/html 8000 # then open http://localhost:8000 in your browser ``` -------------------------------- ### Install macOS command line tools Source: https://github.com/cleder/brkrs/blob/develop/docs/quickstart.md Command to install Xcode Command Line Tools if not already present. ```bash xcode-select --install ``` -------------------------------- ### Create System Module File Source: https://github.com/cleder/brkrs/blob/develop/specs/025-ball-spawn-bricks/quickstart.md Use the touch command to create the system module file for ball spawning logic. ```bash touch src/systems/ball_spawn_bricks.rs ``` -------------------------------- ### Build and Run Commands Source: https://context7.com/cleder/brkrs/llms.txt Commands for cloning, building, and running the game for desktop or WebAssembly targets. ```bash # Clone and build git clone https://github.com/cleder/brkrs.git cd brkrs # Run in release mode (recommended for performance) cargo run --release # Run specific level (desktop only) BK_LEVEL=42 cargo run --release # Build for WebAssembly cargo build --release --target wasm32-unknown-unknown wasm-bindgen --out-dir ./out --target web ./target/wasm32-unknown-unknown/release/brkrs.wasm ``` -------------------------------- ### Minimal Level RON Example Source: https://github.com/cleder/brkrs/blob/develop/specs/007-level-metadata/data-model.md A basic RON file example for LevelDefinition, demonstrating backward compatibility by including only essential fields. ```ron LevelDefinition( number: 1, matrix: [ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], // ... 19 more rows ], ) ``` -------------------------------- ### Run native build and tests Source: https://github.com/cleder/brkrs/blob/develop/specs/004-pause-system/quickstart.md Standard commands for testing and running the game on native platforms. ```bash cargo test cargo run --release ``` -------------------------------- ### RON Description Field Examples Source: https://github.com/cleder/brkrs/blob/develop/specs/007-level-metadata/contracts/level-format-contract.md Examples of how to define the optional description field in RON format, supporting single-line and multi-line raw strings. ```ron description: Some("Beginner-friendly tutorial level") ``` ```ron description: Some(r#" Expert challenge level featuring: - Narrow corridors - Indestructible maze (type 90) - Multi-hit targets (types 10-13) "#) ``` ```ron // No description field needed ``` -------------------------------- ### Checkout and Verify Project Source: https://github.com/cleder/brkrs/blob/develop/specs/025-ball-spawn-bricks/quickstart.md Commands to switch to the feature branch and verify the build environment. ```bash git checkout 025-ball-spawn-bricks git pull origin 025-ball-spawn-bricks ``` ```bash cargo build cargo test --lib ``` -------------------------------- ### Complete Level Definition Example Source: https://github.com/cleder/brkrs/blob/develop/assets/levels/README.md An example of a complete LevelDefinition including gravity, description, author, matrix, and presentation settings. This level is a tutorial. ```rust LevelDefinition( number: 1, gravity: Some((2.0, 0.0, 0.0)), description: Some("Tutorial level: Learn the basics"), author: Some("[Tutorial Team](https://github.com/brkrs/levels)"), matrix: [ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,20,20,20,20,20,20,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,20,20,20,20,20,20,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,20,20,20,20,20,20,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,20,20,20,20,20,20,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], ], presentation: Some(( level_number: 1, ground_profile: Some("ground/tutorial"), background_profile: None, sidewall_profile: None, tint: None, notes: Some("Tutorial level ground texture"), )), ) ``` -------------------------------- ### Initialize Test File Source: https://github.com/cleder/brkrs/blob/develop/specs/025-ball-spawn-bricks/quickstart.md Create the test file structure for the new feature. ```bash # File: tests/ball_spawn_bricks.rs touch tests/ball_spawn_bricks.rs ``` -------------------------------- ### Install ALSA Development Libraries (Linux) Source: https://github.com/cleder/brkrs/blob/develop/specs/001-complete-game/quickstart.md Install ALSA development libraries on Ubuntu/Debian systems to resolve compilation errors related to ALSA. ```bash sudo apt install libasound2-dev ``` -------------------------------- ### RON Author Field Examples Source: https://github.com/cleder/brkrs/blob/develop/specs/007-level-metadata/contracts/level-format-contract.md Examples of how to define the optional author field in RON format, supporting plain text names and Markdown links. ```ron author: Some("Jane Smith") ``` ```ron author: Some("[Jane Smith](mailto:jane@example.com)") ``` ```ron author: Some("[Community Team](https://example.com/team)") ``` ```ron // No author field needed ``` -------------------------------- ### Create Audio Assets Directory Source: https://github.com/cleder/brkrs/blob/develop/specs/006-audio-system/quickstart.md Initializes the directory structure required for audio files. ```bash mkdir -p assets/audio ``` -------------------------------- ### Run the game in release mode Source: https://github.com/cleder/brkrs/blob/develop/docs/faq.md Execute the game with performance optimizations enabled. ```bash cargo run --release ``` -------------------------------- ### Level Metadata Format - RON Example Source: https://github.com/cleder/brkrs/blob/develop/specs/020-gravity-bricks/plan.md Example of how to define an optional gravity field within a level's metadata file using RON format. ```ron // assets/levels/level_1.ron ( name: "Level 1", bricks: [ // ... brick definitions ... ], gravity: Some((0.0, 10.0, 0.0)), // Optional level gravity // ... other fields ... ) ``` -------------------------------- ### Initialize Test File Source: https://github.com/cleder/brkrs/blob/develop/specs/026-direction-bricks/quickstart.md Creates the skeleton file for direction brick unit tests. ```bash touch tests/direction_bricks.rs ``` -------------------------------- ### RON Example Level Definition Source: https://github.com/cleder/brkrs/blob/develop/specs/007-level-metadata/research.md Example of a level definition in RON format, showcasing optional fields like description and author, and the use of raw strings for multi-line content. ```ron LevelDefinition( number: 42, gravity: Some((0.0, -9.81, 0.0)), description: Some(r#"\n Classic maze layout with narrow corridors.\n Tests player precision and patience.\n Indestructible bricks form the outer walls.\n "#), author: Some("[Jane Smith](mailto:jane@example.com)"), matrix: [ // ... level data ], ) ``` -------------------------------- ### RON Level File Structure Example Source: https://github.com/cleder/brkrs/blob/develop/specs/001-complete-game/research.md Example structure for level definitions using RON (Rusty Object Notation). This format integrates seamlessly with Rust and serde for serialization. ```text // assets/levels/level_001.ron Level( bricks: [ Brick(pos: (0, 0), type: Standard), Brick(pos: (1, 0), type: MultiHit(durability: 2)), // ... ], ``` -------------------------------- ### Implement load_audio_assets System in Rust Source: https://github.com/cleder/brkrs/blob/develop/specs/006-audio-system/tasks.md Implements the startup system to load audio assets from a manifest file. This system populates the AudioAssets resource. ```rust fn load_audio_assets( mut commands: Commands, asset_server: Res, manifest: Res, mut audio_assets: ResMut, ) { // Load sounds based on manifest and populate audio_assets.sounds // Example: // let sound_handle = asset_server.load("audio/brick_destroy.ogg"); // audio_assets.sounds.insert(SoundType::BrickDestroy, sound_handle); } ``` -------------------------------- ### Example Debug Log Message for Paddle-Brick Collision Source: https://github.com/cleder/brkrs/blob/develop/specs/022-paddle-destroyable-brick/quickstart.md An example of a console log message indicating a collision between the paddle and a type 57 brick, including the brick's entity ID. ```text DEBUG paddle_destroyable: Paddle-brick type 57 collision detected: brick=Entity(...) ``` -------------------------------- ### Build and Serve WASM Project Source: https://github.com/cleder/brkrs/blob/develop/specs/003-map-format/quickstart.md Commands to compile the project to WASM, prepare assets, and serve the application locally. ```bash # Run wasm-bindgen wasm-bindgen --out-dir wasm --target web \ target/wasm32-unknown-unknown/release/brkrs.wasm # Copy assets cp -r assets wasm/ # Serve locally cd wasm python3 -m http.server 8000 ``` -------------------------------- ### Parallel Example: Phase 2 (Foundational) Tasks Source: https://github.com/cleder/brkrs/blob/develop/specs/001-sphinx-docs/tasks.md Illustrates tasks that can be executed in parallel versus sequentially within Phase 2 of the project. This helps in understanding task dependencies and execution order. ```text # Sequential (blocking): T005: Create docs-pr CI workflow # Parallel after T005: T006: Create docs-main CI workflow T007: Create readthedocs.yml T009: Add Makefile targets # Sequential (depends on T006): T008: Create rustdoc staging script ``` -------------------------------- ### Example Level with Brick 41 Source: https://github.com/cleder/brkrs/blob/develop/specs/019-extra-ball-brick/quickstart.md Integrate Brick 41 into level definitions by adding its ID (41) to the brick_matrix in RON level files. This example shows a row of extra-life bricks. ```ron ( id: "test_extra_life", name: "Extra Life Test", brick_matrix: [ [41, 41, 41], // Row of extra-life bricks [10, 20, 30], // Regular bricks ], ball_spawn: (x: 0.0, y: 1.0, z: 0.0), paddle_spawn: (x: 0.0, y: 0.5, z: 0.0), ) ``` -------------------------------- ### Up Impulse Behavior Source: https://github.com/cleder/brkrs/blob/develop/specs/026-direction-bricks/data-model.md Example of velocity modification for Brick 46. ```text Input: Ball velocity = (3.0, -2.0, 0.0) Impulse: Apply +5.0 to Y Output: Ball velocity = (3.0, 3.0, 0.0) ``` -------------------------------- ### Example Migration to Enhanced PBR Profile Source: https://github.com/cleder/brkrs/blob/develop/specs/017-brick-material-textures/data-model.md Demonstrates adding an ORM texture path to an existing PBR profile for enhanced material properties. This is an optional enhancement. ```diff ( id: "brick/default", albedo_path: "brick_albedo.png", normal_path: Some("brick_normal.png"), + orm_path: Some("brick_orm.png"), roughness: 0.8, metallic: 0.0, uv_scale: (1.0, 1.0), uv_offset: (0.0, 0.0), fallback_chain: [], ) ``` -------------------------------- ### Create Game State Module Files Source: https://github.com/cleder/brkrs/blob/develop/specs/027-game-states/quickstart.md Create the necessary Rust files for the game state module and its associated systems. ```bash # Create game state module touch src/game_state.rs # Create state transition systems touch src/systems/game_state_transitions.rs # Create UI modules mkdir -p src/systems/ui touch src/systems/ui/main_menu.rs touch src/systems/ui/game_over.rs ```