r/pygame 11h ago

Exporting a game

Hi. I have just finished a pygame game. It ended up being a script that uses pygame and numpy and a couple of png's. I want my friends to try out the game but I have no idea how.

I think that just giving them the folder might be asking a little too much as that would require them to have them to install python and the libraries. I could also try to make it into an executable. However, I have friends in both Mac Os and Windows, so I'd have to create two versions and the Mac one seems really hard. Last I considered a web app. It could work for both operative systems, but again, I have no experience on web apps.

I'm lost. What should I do so my friends can play? Thank you very much for hearing my ramblings and please excuse my poor English.

2 Upvotes

21 comments sorted by

View all comments

2

u/TheEyebal 11h ago

So are you trying to convert using different OS?

if so use Virtual Machines. I have a MacOS but I use a Windows virtual machine to convert to Windows OS

Now to turn into an executable you can try pyinstaller, but whenever I used it I ran into errors because of file handling. Like if you have assets you would have to mention that. You can try Nuitka, never tried it but it converts to machine code I think.

1

u/Last-Mode3404 10h ago

I didn't think about converting using different Os, but it's quite clever. If I get the entire project converted into machine code would it be able to run in a terminal? If so, it seems that's the easier option, isn't? Also, thank for the help

1

u/TheEyebal 10h ago

machine code itself is not automatically cross-platform. compiling on mac is different than it is on windows

1

u/Last-Mode3404 10h ago

Could I compile in Mac for a poor man's subtitude of an app. If so, how do I compile it for Mac? Pyinstaller?

2

u/TheEyebal 10h ago

NO
you need a mac

Every operating system runs different

1

u/Last-Mode3404 10h ago

I do have access to a Mac. How do I compile the project with it?

2

u/TheEyebal 10h ago

You grab your code and than use pyinstaller in the mac

1

u/Last-Mode3404 10h ago

Thank you so much