Project Folder

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Posts: 11
Joined: Tue Mar 14, 2017 3:50 pm
Tumblr: brixujel
Deviantart: brixujel

Project Folder

#1 Post by Dreamulex » Sat Jun 23, 2018 12:47 pm

Does anyone have a specific way they like to set up their project folder when working with Renpy? I looked at mines and remembered that some people like to do stuff in their own way so I was curious about if anyone either likes to stick with how it is already set up or came up with their own personal style to help them stay organized.
~Your imagination is your only Limitation~

User avatar
Eileen-Class Veteran
Posts: 1272
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: xavimat
Location: Italy

Re: Project Folder

#2 Post by xavimat » Sun Jun 24, 2018 7:15 am

EDIT: I've written this answer and then I realize that this is a very personal answer. Actually, I'm organizing things in different ways according to what I need in every project (see the fonts example below). I explain things very specific for what I do, so maybe it's not useful for you, or maybe it is. Just my thoughts:

- I have to say that I start without order, writing class definitions, screens styles and transforms in script.rpy. But soon, when the project gets a bit complex, I organize my script files in "definitions.rpy" "my_screens.rpy" and "chapters.rpy", in the game folder.

- When I create folders, I usually keep the names very short (two-three letters).

- Inside the "images" directory, I put directories to classify my images (a folder for every main characters, a folder for generics, another for backgrounds named "bg"). I use the magic of renpy using only the name of the file, so I don't need to declare them unless I need ATL embeded in the image. But it's easier anyway, for example, imagine that I have a file named "logo_1.png" inside the folder "images/special/logos/":

Code: Select all

image animated_logo:
    "logo_1"  # I don't need to put here "images/special/logos/logo_1.png"
    rotate_pad True
    rotate 0
    linear 1.0 rotate 360
- For sounds and music I create folders in the game directory named "so" and "mus". (I know, i'm lazy). For these files you need the path, so it's better to keep it short: play sound "so/crack.ogg"

- I usually put special fonts in the "gui" folder. They are only referenced in the gui.rpy, so it's easy to name it like "gui/KingsCalligraphica.tff". But, I have a project where I need to change a lot the font inside text, so I use the font tag. Using the entire name every time is tedious ("Bla bla {font=gui/KingsCalligraphica.tff}Name{/font} bla bla bla."). So i changed the name of the font to "k.ttf" and put it in the game directory, so the text tag is shortened to: "Bla bla {font=k.tff}Name{/font} bla bla bla."

- While I'm working, I create a "resources" folder in the base directory (where the "game" directory is). There I have lots of placeholder images, chunks of old code in files named. "something.rpy_OLD" so they are not executed; fonts not used, PSD or XCF files, .odt files with the script and translations... etc. Everything that won't be in the build.

When doing the build, I put everything in archive.rpa, and tell renpy not to archive the entire "resources" folder and the ".rpy" files. So I don't need to delete anything before the build:

Code: Select all

    ## 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)

    build.classify('resources/**', None)
    build.classify('game/**.rpy', None)

    ## To archive files, classify them as 'archive'.

    build.classify('game/**.png', 'archive')
    build.classify('game/**.jpg', 'archive')
    build.classify('game/**.ogg', 'archive')
    build.classify('game/**.otf', 'archive')
    build.classify('game/**.ttf', 'archive')
    build.classify('game/**.rpyc', 'archive')
    build.classify('game/**.rpym', 'archive')
    build.classify('game/**.rpymc', 'archive')
I've seen some games with placeholders and PSD files not archived, probably because they forget to delete them. I don't need to delete anything; everything in the "resources" folder won't be in the game, and all my files are in the project file.
Cops&Robbers A two-player experiment
Fear&Love Why can’t we simply express our feelings? Why am I afraid to say ‘I love you’?
unknown [Sci-Fi - mystery - computer]
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
Eileen-Class Veteran
Posts: 1605
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor

Re: Project Folder

#3 Post by Imperf3kt » Sun Jun 24, 2018 5:23 pm

It kind of depends on what a project is.

For the most part, I use the default structure, but I always add a 'music' folder and in my ren'py launcher, I added a button to open that folder. Of course, it is deleted every time I update :(

Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Post Reply

Who is online

Users browsing this forum: No registered users