Skip to content

MOBA: Wire input system into editor#68

Merged
stainlu merged 1 commit into
mainfrom
moba-wire-input
Mar 21, 2026
Merged

MOBA: Wire input system into editor#68
stainlu merged 1 commit into
mainfrom
moba-wire-input

Conversation

@stainlu
Copy link
Copy Markdown
Owner

@stainlu stainlu commented Mar 21, 2026

Summary

  • Wire winit keyboard/mouse/scroll events into the InputState ECS resource when the editor simulation is playing, enabling gameplay systems to read human input
  • Add default MOBA ActionMap bindings (Q/W/E/R abilities, right-click move, A attack-move, S stop, Space center camera)
  • Add InputState::set_scroll() method and begin_frame() call at the start of each game tick
  • Editor controls (gizmo manipulation, entity selection, camera orbit) remain unaffected -- input forwarding only activates in play mode

Test plan

  • cargo clippy --workspace -- -D warnings passes
  • cargo fmt --all -- --check passes
  • cargo test -p euca-input passes (8/8)
  • Manual: launch editor, enter play mode, verify key presses update InputState
  • Manual: verify editor gizmo/selection/camera still work in edit mode

🤖 Generated with Claude Code

- Add InputState resource to the editor world at startup
- Create default MOBA ActionMap bindings (Q/W/E/R abilities,
  right-click move, A attack-move, S stop, Space center camera)
- Forward winit keyboard, mouse button, cursor, and scroll events
  to InputState when the simulation is playing
- Call InputState::begin_frame() at the start of each game tick
  to clear per-frame state (just_pressed/just_released/deltas)
- Add InputState::set_scroll() method to euca-input crate
- Add winit_key_to_string() helper to convert winit Key variants
  to the string names used by InputKey::Key

Editor controls (gizmo, entity selection, camera orbit) remain
unaffected because input is only forwarded when playing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying euca-engine with  Cloudflare Pages  Cloudflare Pages

Latest commit: d3106f8
Status: ✅  Deploy successful!
Preview URL: https://a70e3b55.euca-engine.pages.dev
Branch Preview URL: https://moba-wire-input.euca-engine.pages.dev

View logs

@stainlu stainlu merged commit 586d276 into main Mar 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant