Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Thanks for the tip! However, for whatever reason, the cx_Freeze automatic package detection includes a lot of unnecessary packages too. For example, my tensorflow package gets packed together if I don't exclude it, although it wasn't even used in the game. I tried reducing the includes by expanding the list of excludes but it still wasn't going well (Still around 50 MB).

Also, the FPS meter above is just a bypass using the pygame.display.set_caption() that sets the caption on the title bar. I just set the resulting FPS from the get_fps() function on my pygame Clock object.

(1 edit)

Yea, cx_Freeze by default includes various packages which are unnecessary because it doesn't know the packages required by our program so tries to pack all or most of them, and it's a very good practice to exclude them as they are not needed, but, I'm saying about the script levels.py in scripts folder, you don't need to copy and paste that file/folder in the package of exe file, along with __pycache__ which is the cache of Python files. cx_Freeze automatically packs it somehow, try to run the game by moving scripts directory to somewhere else in the File System and you will see the game running! But, for assets like Sounds and other Data files, you need to pack it as you have done for Sounds.

Ohh, yeah, that's a nice approach to display FPS :)

(+1)

Oh, you mean the content of the whole Scripts folder? I just included the whole folder as per procedure to avoid leaving out something (as I was using the cx_Freeze even before they changed to the current compact format for the setup.py so it was ingrained in my system XD), though I am aware that the __pycache__ folder is not required. Still, thanks for clarifying. ^_^

(1 edit)

Ohk, by the way, I meant __pycache__ along with levels.py too :)