Ren'Py 101: Releasing Your Game Part Iby Rio
We are now almost done with the Ren'Py tutorials and covering an important aspect of game making - putting in the final touches before releasing your game.
1. Obfuscating Images
Obfuscating images in Ren'Py is just basically archiving all the images into one file. It's useful for those who:
If you agree with at least one of those above, then let's get to obfuscating your images...
As mentioned earlier in What's What: Files and Folders, you will have to use a file called archiver.exe (for Windows users) or archiver.py (for Unix/Linux and Mac users) found in the same folder as your run_game.exe file. When run, archiver will take all the images you specified and create a single file called images.rpi and images.rpa. These two will be all you need to put into your image folder upon release. Great, huh?
The first thing you have to do is run your Command Prompt. It will basically spit out a line much like this:
The first letter tells you what hard disk drive you are currently in - C: drive, in the above example. "\" tells you what folder you are in. The first "\", for example, tells you that you are currently in the C: drive and in the "Document and Settings" folder, while the next one tells you that you are now in the "Visitor" folder. In hierarchal terms (or how it would look under Explorer), it will be something like this:
If the current prompt is not where your game is located, you have to navigate your way to your Ren'Py game folder. Here are some basic DOS commands to move around:
To move down or up a folder, use the cd (short-hand for "change directory") command. For moving down, just type "cd" a space, the path to the folder, and press Enter. To move up a folder, type "cd .." and press Enter.
If you're moving down files, you have to make sure you are naming the folders correctly and the folders are actually where they are. If the folders are not there, an error message will pop up. If you can't remember the exact path to your game folder, open up a window to it. There usually is an address bar with the path listed under the menu bar (#1) or if that's not there, check the windows' title and the path should be listed there as well (#2).
Now that you know how to move up and down folders, go to the folder where your images are located. Mine are directly under the game folder like in the original Ren'Py release, so I would place a command like so:
Then you have to run the archiver file like so: ".. archiver.exe images *.jpg *.png *.gif" Let's get down to what each section means...
".." makes it go one folder up and looks for the file "archiver.exe". Archiver.exe is executed and is told to make a file called "images" when it is done. The images to be archived are specified after "images". In other words, all jpg, png, and gif files will be archived. * is a wildcard and basically means the file can be any name just as long as it ends with the extension .jpg, .png, or .gif.
Note: For your game, type out only the image file types you are using. Also, if you have your graphics under multiple layers of folders, use the "..\.." method. It is also best if you have all your images under one folder. If you have them spaced out in various folders like: character, background, and game - you will have to go to each folder and archive the images in them seperately.
If you check the folder where your images are, you will see two new files: "images.rpa" and "images.rpi". All your image files are now in one convenient file. Note: If you made new images or made changes to your images, you will have to re-archive them all.
The next step is to direct Ren'Py to this file in your script. Open up your script and under the init block, enter the following code: $ config.archives = ['images']
Note: I make two seperate folders. One folder for tweaking and another folder for release. I suggest you create another folder that will be the released version that you zip or rar.
Back to Dev Corner | Back to Top
2. Making a README File
Another thing to consider when releasing your game is to make a README file. It is generally made in Notepad or similar basic word editor. Most people tend to skip the README file (I know I generally do :P) but it's quite helpful for those who may encounter problems with your game. Here's what is generally found in a README file:
1. About the Game - synopsis, hardware requirements, release date, rating, playtime, credits, platform, etc
These are what are generally found but you can add more as you see fit. For example, I tend to put a Table of Contents with my README file. Below is what I put under "How to Run the Game". It was borrowed from PyTom with some additions on running the game on Mac.
Make sure you give proper credit for everything! If, for some reason, giving credit in your game is not appropriate, then by all means, do so in your README file.
<< Writing Your Script Part II | Back to Dev Corner | Releasing Your Game Part II >>