-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
The current implementation of in put in Fling is very bad. It is essentially querying the key state from GLFW all the time.
First up, we need some
We should change it so that input is polled at a very specific time in the engine.
Some notes on what this change may entail:
- Replace GLFW as the input interface in favor of each platform's own OS implementation (Win32 API, X11 on linux probably, and possibly the Game Input for windows library to support Gamepads on windows. Xinput on linux).
- This task will require a large refactor how the input API looks. We need to be able to support multiple different input libraries at once (i.e. XInput + Win32) so we need a much better abstraction for what the input code looks like - Create a separate input polling thread that runs at a fixed tick rate (120hz, and all it to be configurable)
- Have the game thread be a consumer of the above input thread and query it once at the top of the game frame, making the state available for all game/editor code
- We need an input device connection interface of some kind. A way to map HID's to individual "users". This way you can support split screen
- A system to query some metadata about each of these connected devices
- We can then utilize this system to build dynamic UI to reflect what kind of icons and things should be in use
- We can also use this to do different things based on the input device all over the place. Different values for force feedback, input mappings, etc.
Metadata
Metadata
Assignees
Labels
No labels