Hello everyone,
I have a question and I hope you will be so kind as to help me.
After I finished my first game in Renpy and pressed Build Distribution in Renpy, a packed file came out at the end. After I unpacked it, the game ran exactly as I had imagined. But then I realized that my folders for music and pictures (where my animations are also located) in the game folder are just so openly visible. This is not the case with other games that I play, for example Beeing a DIK or Horton Bay Stories.
Can someone be so kind and explain to me what I have to do so that my pictures, music and animations are not just visible???
Many thanks in advance...
Mark
Why can everyone see my pictures/music folders???
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
- Newbie
- Posts: 8
- Joined: Fri Aug 11, 2023 8:39 pm
- Contact:
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3825
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Why can everyone see my pictures/music folders???
in options.rpy, near the bottom you'll find a section you'll want to edit.
Some of this may not be in yours, I copied it from an active project I have at the moment, so it may be slightly different.
Some of this may not be in yours, I copied it from an active project I have at the moment, so it may be slightly different.
Code: Select all
## Build configuration #########################################################
##
## This section controls how Ren'Py turns your project into distribution files.
init python:
## The following functions take file patterns. File patterns are case-
## insensitive, and matched against the path relative to the base directory,
## with and without a leading /. If multiple patterns match, the first is
## used.
##
## In a pattern:
##
## / is the directory separator.
##
## * matches all characters, except the directory separator.
##
## ** matches all characters, including the directory separator.
##
## For example, "*.txt" matches txt files in the base directory, "game/
## **.ogg" matches ogg files in the game directory or any of its
## subdirectories, and "**.psd" matches psd files anywhere in the project.
## Classify files as None to exclude them from the built distributions.
build.classify('**~', None)
build.classify('**.bak', None)
build.classify('**/.**', None)
build.classify('**/#**', None)
build.classify('**/thumbs.db', None)
## To archive files, classify them as 'archive'.
build.classify('game/**.png', 'archive')
build.classify('game/**.jpg', 'archive')
build.classify('**/**.webm', 'archive')
## Files matching documentation patterns are duplicated in a mac app build,
## so they appear in both the app and the zip file.
build.documentation('*.html')
build.documentation('*.txt')
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
-
- Newbie
- Posts: 8
- Joined: Fri Aug 11, 2023 8:39 pm
- Contact:
Re: Why can everyone see my pictures/music folders???
Thanks for the help, but unfortunately I do not understand what exactly I should do now. I'm sorry, but I have never learned programming, but learned everything only from Youtube vids. I guess I'm a bit of a noob. Could you please explain it to me again in more detail?
Thank you very much for the help.
Markus
Thank you very much for the help.
Markus
Re: Why can everyone see my pictures/music folders???
You need to classify/encrypt all your games files into rpa files. That way after building your project you won't see in the built version any files that are declared to be "archived".BlackSnowflake wrote: ↑Sun Aug 13, 2023 1:00 pm Thanks for the help, but unfortunately I do not understand what exactly I should do now. I'm sorry, but I have never learned programming, but learned everything only from Youtube vids. I guess I'm a bit of a noob. Could you please explain it to me again in more detail?
Thank you very much for the help.
Markus
For example "build.classify('**.bak', None)" the "None" word will exclude/remove completely .bak type files from the game. So if you have files that your game does not need entirely, you use this method.
You can build any kind of archives for example for your images:
Code: Select all
build.archive("images", "all")
Now you put the files that the game needs to work but must be invisible. For example:
Code: Select all
build.classify('game/**.png', 'images')
build.classify('game/**.jpg', 'images')
The ** symbol makes so that the it checks everything from the "game" folder all files and folders that contain files with .png and .jpg
If we put like this:
Code: Select all
build.classify('game/gui/*.jpg', 'images')
build.classify('game/gui/*.png', 'images')
Once you built your game you should see in the built version a file called images.rpa(that's the archive) this contains all of your images stored in there, except people won't be able to open it and see the images. only the game itself can see.
Also the game does not need .rpy files in the build, only the .rpyc are important.
The .rpy contains all of your game code for everyone to see which we do not want that in a built version.
The .rpyc(compiled/encrypted of the .rpy files), these files are the actual back bone from where the game reads and runs VERY important files. Must be in the actual built game just archived them like the images just in a different archive(up to you).
So:
Code: Select all
build.classify("game/**.rpy", None)
Note that there are tools that people might use to open .rpa files and see all the contents and decrypt .rpyc and see some if not most of the code. This is pretty much an extra layer of protection and it is up to the people/players to go trough that extra mile to crack your game files.
I am sorry for my bad English, not a native speaker and I also wrote this from my phone.
I hope this helps.
Who is online
Users browsing this forum: No registered users