Open redxtech opened 7 years ago
Awesome!
There are some challengers with making this cross platform. Gopher interacts with the controller through xinput and windows.h. These are to my knowledge only available on windows. I see some possibilites:
I think SDL2 may be possible to use. Another option is GLFW. I believe SDL has full controller support, more uncertain with GLFW.
A pluss with this approach is that it should work with Mac as well. A con is that it will complicate the build process somehow. I can help you here.
I belive using GLFW or SDL2 can fix issues such as #29
Separate the logic of Gopher with the controller interactions. This way we can make two implementation of the controller interaction: on for windows and one for linux.
I think this route is easier, but not necessarily best. The linux implementation may rely on GLFW or SDL2 anyway, so maybe it's best to make the whole switch.
You said you hadn't done much in C++. Do you have more experience in golang or rust? Both of those compile into a single binary, which makes the program easy to distribute. My impression is that golang is easier than C++, and rust is more difficult.
The good thing with this approach is that maybe there exists some cross platform input library that is easy to reuse. Both go and rust are to my opinion more maintainable.
Go example: https://github.com/veandco/go-sdl2
EDIT: QT may be another option. Maybe the easiest: http://doc.qt.io/qt-5/qtgamepad-examples.html
I haven't used golang or rust, but I have used a lot of web development languages, php, ruby, python, and C#. I have been looking to get into working with golang recently, so maybe I could do some of that, and then see how I would work on this project in go.
(Don't worry, I pick up new things very quickly).
Any plans to continue the port to Linux? With some basic introduction I might be able to do some things to it if you're willing to help me out.
I haven't done much with C++, but with some introduction to this project I might be able to get something done.