Jump to content
  • Advertisement
foolz887

Having problems converting my game to exe

Recommended Posts

My game is in python using pygame.  It has a lot of images and sounds. With multible scripts.  I tried to use pyinstaller but it failed.  Not up to date with python 3.6.  Is there anything better other than Fx_freeze.  I'm having trouble understanding there docs..

  I would really like to add my game to some sites and I'm told converting the game to a exe is my best bet

Share this post


Link to post
Share on other sites
Advertisement

In the past, I've used both py2exe and cx_freeze for Python/Pygame games. Both have worked, in terms of making a working executable.

I don't remember the exact syntax to make them work, but I know that both of those will work.

The end result isn't an indtaller, though; it's simply a copy of your directories/scripts/game files, with an executable binary file to launch the game. From there, you still have to "package" the game (for "packaging", I would always just zip or tar.bz2; I never made a proper "installer")

Share this post


Link to post
Share on other sites

Thank you masskonfuzion,  I tried cx_freeze with tutorials last night along with trying to make a bat file to play it and both were unsuccessful. 

   does anyone know of some better examples of use.   all the examples  and tutorials I can find are all with little games.  mostly or all one script and one or two image files.  I have nearly 100 images and about 20 sound files...

  here is my script for my cx_freese *

-----------------------------------------------

from cx_Freeze import setup, Executable
setup(
 name = "spaceshooterREMASTEDgame",
 version = "0.1",
 description  = "classic space shooter",
 executables = [Executable(spaceshooterREMASTEDgame.py)])
---------------------------------------------------------------------
NameError: name 'spaceshooterREMASTEDgame' is not defined  <-----this is the error I get in my command window when attempting to build the setup.py file

Share this post


Link to post
Share on other sites

I fixed this problem by copying the file cxfreeze-quickstart and pasted it in the file with my main script.  Then I ran it in my bash hub.

Made me a perfectly good setup.py script.  ran that (python setup.py build).  Then after the build folder was complete I pasted the images and sound files into the same build folder...and.....a working executable 

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!