Don't really know what to do here... (Python project into Arcade Retropie system)
-
Well, me and my friend created a game of our own in python, and we planned on putting it in an arcade that has Retropie in it (created by our classmates that also had a project), but we are stuck on how to actually implement it in the retropie system, since it only reads ROM files.
We are really new to games devolpment, we have never done anything like this before so we are super newbs on everything like this.
This is a very important project of ours, that will be part of our final grade of the whole course (60%), but then again thats the purpose of this challenge, to overcome difficulties, so far we have overcome every difficulty presented to us, by using information online, and using our creative minds (XD), because well, our course doesn't really teach much in this area, we didnt even know how to program games, or in python in the start of the project. So yeah we dont really know what to do, we have searched on a lot of places, but the regular answer we find is "hum... yes its possible" but then we cant find any way of actually doing it.
So I came here as a last resort to get precise information by the pros that could be helpful.So this is the problem we have:
We have an idea of what to do, which is transforming our python game files into a ROM file, but we dont even know how to do it, if there is some kind of program that does this.
I might have an idea of how it works, it might just be literally putting the game files in a read only format, and the retropie system would "detect" the .exe file inside the ROM and initiate the game. But again this is just me trying to figure it out with random information on the internet and my own experience on the case.
We are really lost still, and we really really wanted to make this game possible on the arcade.
This might be super obvious, and I hope it is, we just couldn't find any concrete information online or in our school to work with. -
@Ray-Man said in Don't really know what to do here... (Python project into Arcade Retropie system):
We have an idea of what to do, which is transforming our python game files into a ROM file, but we dont even know how to do it, if there is some kind of program that does this.
That would be pointless, because the 'emulator' needed to run your 'ROM' would still be Python, so you're just changing the shape, but not the content of your program - you'd still need Python to run your game.
I might have an idea of how it works, it might just be literally putting the game files in a read only format, and the retropie system would "detect" the .exe file inside the ROM and initiate the game. But again this is just me trying to figure it out with random information on the internet and my own experience on the case.
RetroPie is based on Raspbian Linux - is your game running on Raspbian Linux ? If not, then making it run on Raspbian Linux is your first step. If you don't have a Raspberry Pi, then use an Ubuntu (for PC) distribution to port/check your game.
Once your game works on Linux, then you can 'install' it in RetroPie as a Port - take a look at the Docs on how to add it.
-
We've read online about python working well on raspbian in multiple forums, so it should work (we also tried running a python game in a windows computer without python installed and it worked [the game is Street pyghter]), we are going to try and experiment what you recommend, and we hope its going to work.
-
I can not say much about python, but it should be possible to run python scripts in RetroPie. Not sure about python games. It should be possible to create a bash script that you can use for launching your python script or python game.
A simple bash script starts with these commands:
#!/bin/bash echo Hello, World!
RetroPie uses runcommand to launch emulators with supported rom file format for each specific emulators that uses RetroArch.
Now if you can somehow get python to be seen and used as an emulator you could take advantage of that and create a launch.sh file.Otherwise a more simple approach would be to create simple launch.sh bash file like this:
#!/bin/bash python /location/to/your/python/script/file.py
Then save it into /home/pi/RetroPie/roms/ports and name it something relevant, example: Street-pyghter.sh.
Restart RetroPie or Emulationstation and go into Ports section and start the game from the sh file that you created. Remember that python must be installed in Raspbian with the command: sudo apt-get install python You can do this in Linux terminal or Command Line(CLI). -
Mystic Mine is a Python game included in RetroPie. You can find it in the Experimental packages. I strongly recommend you to study how this game is programmed as it runs very well on the Raspberry Pi.
The scriptmodule that installs and configures this game in RetroPie is here: https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/ports/mysticmine.sh
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.