Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

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.


  • Global Moderator

    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?


  • Global Moderator

    @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 like pygame_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?


  • Global Moderator

    @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?


  • Global Moderator

    @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 ?


Log in to reply
 

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.