-
Notifications
You must be signed in to change notification settings - Fork 2
Input Handling
Isthimius edited this page Jun 22, 2026
·
1 revision
Gondwana reacts to input via polling, not via platform-events
Platform adapters feed raw device state into engine pollers, and the engine checks those pollers during its background task phase.
The engine exposes centralized access to:
- keyboard
- mouse
- gamepad
- touch
via EngineInputSystems.
Input is polled during DoBackgroundTasks, before rendering. That means input changes can affect movement, animation, or scene state before the next frame is drawn.
Because the engine wants deterministic update flow:
- timer events
- input polling
- movement
- collisions
- camera updates
- rendering
Polling keeps those steps ordered and predictable.
The core engine does not want to know about WinForms, Avalonia, SDL2, or browser specifics. Those details stay in adapters. The engine only consumes normalized input state.
Gondwana/EngineInputSystems.csGondwana/Input/Keyboard/KeyboardEventPoller.csGondwana/Input/Mouse/MouseEventPoller.csGondwana/Input/Gamepad/GamepadEventPoller.csGondwana/Input/Touch/TouchEventPoller.cs