ChiraEngine icon indicating copy to clipboard operation
ChiraEngine copied to clipboard

Replacement input system

Open ashifolfi opened this issue 3 years ago • 3 comments

Component to Improve

Core Engine

Describe Your Suggestion

The current input system is not very flexible and kinda sucks to work with. We should replace it with something else.

Here's a list of possible replacements I've found to handle inputs:

  • input_lib
  • SDL (yes this is extremely overkill but it IS still a valid option if all else fails) and of course there's always the option of just rewriting what we have

ashifolfi avatar Nov 04 '22 21:11 ashifolfi

feel free to add any other suggestions here this is just what I found from searching

ashifolfi avatar Nov 04 '22 21:11 ashifolfi

I would rather rewrite what we have tbh It would be best to make input mappings that aren't defined in code, but defined by the user I think, none of the two linked would allow that without writing a wrapper anyway Handling input cannot be too hard compared to other engine tasks

craftablescience avatar Nov 04 '22 23:11 craftablescience

We're going to use SDL once #39 is in, but we still need our own system on top of it to keep everything pretty looking

It would be great if we could just copy how Godot does it but mix it up a bit, where keys, buttons, joysticks, etc map to a single named action specified in a config and you can register/deregister hooks into that named action (or check if that action is being fired in the update function, which is also more like Godot and is probably more scripting-language friendly but might be slower depending how it's implemented)

craftablescience avatar Dec 12 '22 06:12 craftablescience