44 Commits (e7f816a7d5d02c740865ebd0649d808054289c8d)
 

Author SHA1 Message Date
Elijah Voigt e7f816a7d5 just test and life tiling almost working 3 days ago
Elijah Voigt fbc9389f57 Debug info: acive cell info 6 days ago
Elijah Voigt 35d6206d5e toggle buttons for toggle actions 6 days ago
Elijah Voigt f3afb2616c use actions for zooming w/ buttons, keys, and scroll wheel 6 days ago
Elijah Voigt 2f59af15df Add Binding::Scroll as an axis input source
The mouse wheel's per-frame delta is a Vec2, so it maps directly onto
axis actions alongside gamepad sticks. hardware_to_actions now reads
AccumulatedMouseScroll in the Axis branch (max-magnitude combine); the
digital branch ignores it, and Scalar is unchanged.

Since an axis is refreshed every frame and the scroll delta is zero when
idle, on_action fires exactly while the wheel turns and the piped value
is the delta — no persistence or edge-guarding needed. Enables e.g.
`.bind(Action::Zoom, [Binding::Scroll])`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6 days ago
Elijah Voigt 09e6c66788 Adopt actions framework 6 days ago
Elijah Voigt 494cdce42e Default action_kind to instant; document multiple action sets
- The #[action_kind(..)] attribute is now optional and defaults to instant
  (the most common kind), so bare enum variants are instant actions.
- Document the multiple-plugin pattern: add one ActionsPlugin::<T> per action
  enum (gameplay/menu/audio/debug) for separation of concerns, each with its
  own independent ActionState/InputMap/systems, plus the run_if(in_state(..))
  approach for mutually-exclusive sets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6 days ago
Elijah Voigt cf3a81f4bd Make ActionSource usable in bsn!; clearer macro errors
- Derive Default on ActionSource so it satisfies bevy's template system
  (Template/FromTemplate are blanket-impl'd only for Clone + Default + Unpin),
  letting it be spawned as a component in a bsn! scene. The bound sits on the
  derived Default impl only, so the Component impl stays generic over every
  GameAction — the fan-in systems keep working for non-Default actions.
- Improve #[derive(GameAction)] diagnostics: each now names the offending
  variant and shows the exact expected syntax (not-an-enum, non-unit variant,
  missing/duplicate/unknown action_kind, malformed action_handler).
- Add a #[cfg(test)] module exercising all four kinds + an #[action_handler]
  each + ActionsPlugin + App::on_action, proving the macro codegen compiles.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6 days ago
Elijah Voigt 33c20d47a0 Add two ways to register action handlers
Both remove the add_systems(.., run_if(on_action(..))) boilerplate:

- `#[action_handler(path)]` derive attribute colocates a handler with its
  action variant and wires it for its kind — a gated plain system for
  instant/toggle, a typed pipe (axis_value/scalar_value) plus gate for
  axis/scalar. The derive generates an `impl GameActionHandlers` (empty when
  no variant declares one), which ActionsPlugin calls on build.
- `App::on_action(schedule, action, system)` (AppActionExt) — the explicit,
  no-macro form that keeps registration visible in main.

ActionsPlugin's Plugin impl now requires T: GameActionHandlers (satisfied
automatically by the derive).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6 days ago
Elijah Voigt 40b3f2adfc Add Scalar action kind for UI sliders
Adds a fourth ActionKind, Scalar, carrying an f32 from a slider's
ValueChange<f32>. It is edge-triggered like Instant but value-carrying
like Axis, completing the edge/level split (Instant/Scalar vs Toggle/Axis).

- ActionValue::Scalar(f32) + as_scalar(); ActionState scalar()/set_scalar().
- active() is now kind-dispatched: edge kinds report "this frame", level
  kinds report current state.
- slider_to_action observer stores live value on every change but only
  triggers on is_final, so gated consumers run once per settled change.
- scalar_value(a) typed provider pipes a bare f32 into In<f32>.
- #[action_kind(scalar)] added to the derive macro.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6 days ago
Elijah Voigt d8e00525ec Add generic, remappable game action system
Introduce engine::actions: an input-source-agnostic action layer that
fans keyboard, gamepad, and Feathers UI (Button/Checkbox) input into a
single ActionState<T> resource, so games gate systems on abstract actions
rather than raw inputs.

- GameAction trait + #[derive(GameAction)] proc macro (new engine_macros
  crate) to declare each enum variant's ActionKind via #[action_kind(...)].
- Three kinds: Instant (momentary), Toggle (persistent on/off), Axis (Vec2).
- Remappable InputMap<T> with additive bind(action, [Binding, ...]).
- Symmetrical entry points over a unified ActionValue: run_if(on_action(a))
  to gate any kind, action_value(a).pipe(sys) to deliver its payload;
  typed axis_value/toggle_value helpers for bare Vec2/bool.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 week ago
Elijah Voigt bc13a3b27b space to play/pause 1 week ago
Elijah Voigt a0ca524599 dial m for... mute/unmute 1 week ago
Elijah Voigt d0703fcedf Disable last selected note to avoid crash when no notes selected 1 week ago
Elijah Voigt 7054bdd469 Added coordinates and cell count debug info 1 week ago
Elijah Voigt 4322863040 wipe board and reset board both implemented 1 week ago
Elijah Voigt db4eb74a45 fix some scheduling issues, material updates, seemingly audio 1 week ago
Elijah Voigt 94052efc6e Updating pitch map updates cell pitches!
There is a new bug related to sound not playing but I think that's
because we're re-assigning sounds soon after spawning cells which is
understandable...
1 week ago
Elijah Voigt 69673ac9c0 notes selection UI works
Still need to update all cells to actually use the new selections...
2 weeks ago
Elijah Voigt 1c0f5ef623 the game does not crash, it's not right but that is in fact a win so we're committing 2 weeks ago
Elijah Voigt bd1cb17c36 sorta fixed loading cells, but now limited cellpitch is not respected... 2 weeks ago
Elijah Voigt ee8a70cc16 mid refactor, saving my place 2 weeks ago
Elijah Voigt 97aa5cb20d Color scheme and some ui cleanup 3 weeks ago
Elijah Voigt 6b492c9a62 life: user defined notes and octaves; saving my place 4 weeks ago
Elijah Voigt 1ac628a503 Slight button themeing 4 weeks ago
Elijah Voigt 94b6faf97a mute cell on placement 4 weeks ago
Elijah Voigt da9550d74c Adopt feathers for ui buttons; rough first draft 1 month ago
Elijah Voigt f53de2307c Refactor cells to full bsn! macro 1 month ago
Elijah Voigt 774e8f11f9 Refactor ui to full bsn! 1 month ago
Elijah Voigt e3f1bf83e2 0.19 upgrade, move some things to bsn! syntax 1 month ago
Elijah Voigt 9debf268a6 Update to bevy 0.19 1 month ago
Elijah Voigt 9069c0b29e life: audio toggle, ui play/plause mute/playAudio toggle 1 month ago
Elijah Voigt be242dbb1f Do not spawn when panning 1 month ago
Elijah Voigt 58aea7b02d life: pan sorta kinda works 1 month ago
Elijah Voigt 84dd94ed3a move /prototypes/life -> life 1 month ago
Elijah Voigt e0194b53e2 prototypes/life: fix some audio jank, still janky just less 1 month ago
Elijah Voigt c731eeb49c prototypes/life: placing cells works again! now with color and sound! 1 month ago
Elijah Voigt 314e604067 prototypes/life: Adding colors and sound, broken but saving my place 1 month ago
Elijah Voigt 839dd3d5a6 prototypes/life: active ui visuals 1 month ago
Elijah Voigt 73246ed035 prototypes/life: the buttons all do things! 1 month ago
Elijah Voigt 53aaf8963a prototypes/life: ui buttons: play, pause, step, quit 1 month ago
Elijah Voigt 59996c9c86 prototypes/life: refactor: message based cell lifecycle 1 month ago
Elijah Voigt a587c17978 prototypes/life: game of life wip 1 month ago
Elijah Voigt c16f4793fe inital commit, scaffolding 1 month ago