0

I have a small pygame based game which uses .jpg and .png files for sprites. I have created a single file .exe with pyinstaller as a --onefile. The problem is that all the game assets are visible within a folder.

How can I hide all the assets or put them in a file that is accessed and not visible to users?

Any ideas would be great.

pythonhunter
  • 957
  • 3
  • 9
  • 23
  • 1
    Hmm.. wherever you put the files, users will be able to find and access them even if you set them to hidden. Your best bet is probably to compress your assets with a password and decompress them as you need them. This stackoverflow answer may be helpful: http://stackoverflow.com/questions/17250/create-an-encrypted-zip-file-in-python see also: https://docs.python.org/2/library/zipfile.html – NJM Aug 11 '15 at 04:21
  • Sure. I'll take a look. – pythonhunter Aug 11 '15 at 04:24
  • This should also be helpful: http://stackoverflow.com/questions/19371860/python-open-file-from-zip-without-temporary-extracting-it – NJM Aug 11 '15 at 04:32
  • 1
    What's the problem with accessible sprites? Do you not want mods/skins/etc.? – TigerhawkT3 Aug 11 '15 at 05:48

0 Answers0