shinyblink / sled

Satanic/Sexy/Stupid/Silly/Shiny LED matrix controller
https://shinyblink.github.io/sled/
ISC License
121 stars 25 forks source link

RFC: Supporting Inputs #85

Open arturo182 opened 5 years ago

arturo182 commented 5 years ago

Nice library you got there, planning on building a matrix myself and want to use sled :)

Was wondering (and I hope I didn't miss anything, I only had a quick read-through of the README), but is there any (planned) support for input devices? I mean like joysticks, gamepads, keyboards, mice.

I think having support would open a whole new world of possibilities, you could have interactive menus, games, etc.

The actual technical solution for supporting those is secondary I think, first would have to decide if it's a good idea ;)

vifino commented 5 years ago

Hey Arturo, fancy seeing you here! :)

Yes, (joystick) input would be very cool. Many people figured it'd be nice. I wanted to open an issue like this one before too, but never bothered. We need networking abstractions as well.

I have no idea how we can handle interactive things and sled's main effect rotation.

But yes, I very much would like to have some input system. Do you have any proposals?

arturo182 commented 5 years ago

Yes, with networking you could also do things like a weather displaying module ;)

I think I need to look more into the code to see what would work best, but presumably some kind of event loop might be the way to go.

vifino commented 5 years ago

I think implementation might be easier if it's not an event loop but done with polling. While it is possible that we'd miss input, if we're running at 60 fps, it hardly makes a difference.

Apart from the whole timer thing needing a rethink in general, there really isn't a sane way to implement an event loop in the modules themselves.

The networking abstractions are meant to make bgm_pixelflut and bgm_opc portable, so you can run pixelflut on your New 3DS XL or something. Apart from networking, we'd probably want sound as well. Not too hard, I'll do that once it comes to that.

basxto commented 4 years ago

As workaround one could allow to send key presess through FISh, but for this FISh needs to support sending commands to the currently running module, which it can’t afaik. @vifino And having stereo output with floppy drives on your big display would be nice.