Using RetroPie For My Own Software
-
Hi all, I am fairly new to the RetroPie community and had a quick question. I am looking to use a kit to convert signals from some buttons and a joystick as I am already using all of my GPIO pins. I was wondering if I would be able to do this when creating my own game? I am currently making TETRIS and it would be really convenient to have the input signals go through my Raspberry Pi 3's USB ports.
-
Depends on how you implement your game, but using USB for the input device(s) is not a problem - most of the USB gamepads/joystick encoders should be recognized by the OS without problems.
-
Thank you! So I would just need to create the game in Python for it to work? or are there any other restrictions that I need to account for?
-
@saiki20 Python is one of the programming languages you can use to create your game, not a bad one.
or are there any other restrictions that I need to account for?
If you'd like the game to work with RetroPie, you should take into account that RetroPie doesn't rely on an Xorg environment on the Pi.
If your game uses something likepygame_sdl2
(which I think uses SDL2 underneath), then it should work. If you already started development, maybe sharing some details about the libraries/framework you're using can help clear up the doubts of your future game ability to run on RetroPie. -
Thanks, I think I could get Python to work with it! What if I were to use ARM assembly?
-
@saiki20 said in Using RetroPie For My Own Software:
What if I were to use ARM assembly?
IMHO you don't need to, at least not at this stage. Some of the underlying libraries already contain ARM optimised code and you're using a high-level language like Python that takes advantage of those libraries.
-
okay, I have decided to use C to program the game. Do I have to do anything special when programing it to account for these new USB signals?
-
@saiki20 said in Using RetroPie For My Own Software:
Do I have to do anything special when programing it to account for these new USB signals?
Can you be more specific ? How are you using the USB ports - just using a regular controller/gamepad or you have a another device type of device that connects via USB and you'd like to act as a controller ?
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.