Can I run self-programed games from C++ on RetroPie
-
I've coded a simple Tetris game via C++, is it possible to boot this game on my RetroPie or do I need a different OS in order to be able to start this game?
If it's possible, how/where do I add the CPP file to my RetroPie and how do I boot it from there?
-
@shou does it run on Linux? Put the command to run it in a
.sh
file and put the.sh
in yourports
roms folder. Install any port of your choice to "activate" theports
system in EmulationStation. -
sorry for the late respond. So I changed from C++ to Python PyGame to create my Game. I just finished it and just to make sure: I only have to put a command to run the Python file in a .sh file and put that specific file in my ports rom folder. afterwards i should be able to casually start the file from my RetroPie?
-
@shou said in Can I run self-programed games from C++ on RetroPie:
afterwards i should be able to casually start the file from my RetroPie?
Almost. If you don't have any other "ports" installed you will need to set up EmulationStation to be able to find your launch script (the
.sh
file). You can install any "port" like Doom or Quake through the setup script to set this up automatically. (Any port will do, you just need any one to configure thePorts
"system" in EmulationStation's systems config file.)Or, manually, you'll need to first copy
/etc/emulationstation/es_systems.cfg
into$HOME/.emulationstation
and then modify this new copy and add to it a "ports" section like:<system> <name>ports</name> <fullname>Ports</fullname> <path>/home/pi/RetroPie/roms/ports</path> <extension>.sh .SH</extension> <command>bash %ROM%</command> <platform>pc</platform> <theme>ports</theme> </system>
-
@shou (also make the .sh file executable, for example with):
chmod +x ~/RetroPie/roms/ports/MYFILE.sh
-
@sleve_mcdichael said in Can I run self-programed games from C++ on RetroPie:
also make the .sh file executable, for example with
That's not really necessary, since
bash
is used to interpret/run the script. -
@mitu ah I guess you're right...seems the autogenerated ones always are though it's not strictly required.
-
I see, thank you guys for the quick response! I'll try it just as explained.
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.