Hi,
I would like to know what would be the easyist way to read an USB gamepad with go as input for a little game?
It would be nice if the code would run crossplatform ARM Linux and AMD64 Mac OS..
I know there are lib usb binding like https://github.com/kylelemons/gousb and https://github.com/boombuler/hid
I would like something which is native go and activly maintained ... any recommenditions the whole project is just for learning purposes..
评论:
drunken_thor:
Sythe2o0:I built mine on top of sdl: https://github.com/tanema/amore/tree/master/joystick I made most packages in my game lib independent so you could theoretically use it by itself but I think you would also need an SDL context running. Not exactly native Go either since it uses cgo for sdl.
egonelbre:There are no native go usb support libraries, afaik. It should be doable to do a c2go + a lot of work on libusb to create one, but there's a lot of code there to deal with.
Sythe2o0:Depends on what you are going for, but... either SDL, glfw should be quite fine. (You can see a glfw example in Zombies on Ice)
PS: as requested, I'm author of that code.
egonelbre:It might be polite to mention this is a project of yours that you are plugging
Wasn't intended as a plug, but added a note nevertheless.
