Keeping things clean and organised

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
wannabedamned
Newbie
Posts: 9
Joined: Wed Jun 21, 2017 6:46 am
Contact:

Keeping things clean and organised

#1 Post by wannabedamned »

I know this is a section for all creative discussion. Not just renpy, but I figured the best place to ask for tips would be here, as the advice I'm looking for is less specific to the language and program, and more to basic organisation.

I have created a demo, which is 6 rooms, 4 characters, and they all have set routines based on Hour and Minute variables, this can change the room they are in, the action they are doing(sleeping, eating, watching TV, etc)

Now it's all great, but I'm finding the code somewhat hard to refer back to when making changes or adding new time variables for certain NPCs. I'm not struggling to the point I'm failing, but taking 60 seconds to find the section of code I should be working on is a little annoying. I am commenting the code, But even looking for #BROTHER - TIME VARIABLE or #NAVIGATION-MAP - BROTHERS ROOM can take time.

I just wondered if anyone had any time saving tips, organisation tips? I'm currently using Editra, are there suggestions for other editors? I do quite like Notepad++ and its ability to put code into trees and minimise. This function appears absent from editra, is it available and i'm overlooking it?

Any help and advice would be great, as right now the game is 6 rooms and 4 characters. There's plans for it to be much bigger, and stopping and scouring code is quite the hindrance.

Thank You!

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: Keeping things clean and organised

#2 Post by Scribbles »

I print some of my variables out (so I type them out correctly), and as for searching for things, you can have separate .rpy folders, and use the search function to cut down on that time spent searching. That's what I do anyway lol
Image - Image -Image

User avatar
carrot
Regular
Posts: 28
Joined: Fri Jul 28, 2017 7:43 am
Contact:

Re: Keeping things clean and organised

#3 Post by carrot »

Atom is a nice text/code editor. Since it's so extensible you can make it as basic or as feature-packed as you want. There's a renpy grammar, too, so you get syntax highlighting.

As far as organisation: if I'm working on a bigger project I'd definitely be separating out code into files and directories.

mikolajspy
Regular
Posts: 169
Joined: Sun Jun 04, 2017 12:05 pm
Completed: Too many, check signature
Deviantart: mikolajspy
Location: Wrocław, Poland
Contact:

Re: Keeping things clean and organised

#4 Post by mikolajspy »

I also prefer to separate everything in different *.rpy files, the smaller portion of code the better, but make sure to name the files good enough, like "S01_WhatHappensInThisScene.rpy" instead of just "01.rpy".The same thing about naming goes to variables, labels etc., it's better to name variable "HowManyTimesSomethingIsHappening = 3" than "i =3" (or any other letter of alphabet).
To test variables in RenPy you can use Developer Menu and Variable Viewer, but in general, some simple print command will be enough to check if variable has correct value.
I like to make a logical graph (basics or algorithms) to see where and what might be happening and how to organize it in code.
Also use commenting in code, but again, make comment that way, so you can quickly search the file (usually Ctrl+F) and get straight where you want to be.

To sum up - naming, naming, naming. Be it file, variable or comment. It makes everything faster.
For example all variables for one character I would start with first one or two letters of their name etc.

User avatar
Katy133
Miko-Class Veteran
Posts: 704
Joined: Sat Nov 16, 2013 1:21 pm
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
Projects: The Butler Detective
Tumblr: katy-133
Deviantart: Katy133
Soundcloud: Katy133
itch: katy133
Location: Canada
Contact:

Re: Keeping things clean and organised

#5 Post by Katy133 »

I first write my entire dialogue script in Word 2013, and I separate each of my scenes in collapsible headers. Each header has its own title, like #1-Kitchen, #2-Garden, etc.

Then I take all that, and copy-paste it into Editra.

If I need to go refer back to a specific part, I'll search an exact sentence using Ctrl+F, or I'll go back to the Word document and check the collapsible headings to find an exact phrase to search for in Editra.
ImageImage

My Website, which lists my visual novels.
Become a patron on my Patreon!

Post Reply

Who is online

Users browsing this forum: No registered users