Quickstart - Ren'Py Documentation
Quickstart - Ren'Py Documentation
Quickstart - Ren'Py Documentation
Quickstart
Welcome to the Ren'Py quickstart manual. The purpose of this manual is
to demonstrate how you can make a
Ren'Py game from scratch in a few
easy steps. We'll do this by showing how to make a simple game,
The
Question.
Once you've downloaded Ren'Py, you'll want to extract and run it.
Choosing and Launching a Project. You should first see what the
completed The Question game looks like. To
do this, start the Ren'Py
launcher, and choose "The Question" from the first screen. Choose
"Launch Project" to
start The Question.
You can get back to the Ren'Py demo by doing the same thing, but
choosing "Tutorial" instead of "The Question".
If this is your first time creating a project, Ren'Py may ask you to
select the projects directory. This is a directory
(also called a folder)
where new projects are created, and is scanned for existing projects. The
directory chooser
might pop up below Ren'Py, so be sure to look for it
there.
The launcher will then ask you for a project name. Since
"The Question" is already taken, you should enter
something different,
like "My Question", and type enter.
After that, the launcher will ask you to select the project resolution.
1280x720 is a good compromise between
game size and image quality.
For the purpose of this tutorial, we will select 1280x720 to match
"The Question"
game art, then click "Continue".
The launcher will then ask you to choose a color scheme – an accent and
background color for the new GUI. It
doesn't matter what you pick at
this point, so just pick something you find appealing, and then click
"Continue".
https://www.renpy.org/doc/html/quickstart.html 1/14
8/14/22, 2:33 PM Quickstart — Ren'Py Documentation
(_images/launcher.png)
The main screen of the Ren'Py launcher.
(_images/project_name.png)
Naming a new project.
https://www.renpy.org/doc/html/quickstart.html 2/14
8/14/22, 2:33 PM Quickstart — Ren'Py Documentation
(_images/resolution.png)
Selecting the project resolution.
(_images/color.png)
Selecting the accent and background colors for the default
theme.
A Simple Game
https://www.renpy.org/doc/html/quickstart.html 3/14
8/14/22, 2:33 PM Quickstart — Ren'Py Documentation
label start:
"Me" "Good..."
"I can't bring myself to admit that it all went in one ear and out the other."
"Me" "Are you going home now? Wanna walk back with me?"
"Sylvie" "Sure!"
To try this out, from the top screen of the launcher select "My Question"
project, and then choose "script.rpy" from
under Edit File. If this is
your first time, Ren'Py will ask you to select an editor (we recommend
Editra for first time
creators), and will download the editor you choose.
Then it will open the script file in the editor.
You're now ready to run this example. Go back to the launcher, and
choose "Launch Project". Ren'Py will start up.
Notice how, without any
extra work, Ren'Py has given you menus that let you load and save the
game, and
change various preferences. When ready, click "Launch Project",
and play through this example game.
The other lines are say statements (dialogue.html#say-statement). There are two
forms of the say statement. The
first is a string (beginning with a double-quote,
containing characters, and ending with a double-quote) on a line by
itself, which is used for narration, and the thoughts of the main
character. The second form consists of two strings.
It's used for
dialogue, with the first string being a character name and the second
being what that character is
saying.
Note that all the say statements are indented by four spaces. This is
because they are a block underneath the
label statement. In Ren'Py,
blocks must be indented relative to the prior statement, and all of
the statements in a
block must be indented by the same amount.
"Sylvie" "Did you ever hear Lincon's famous saying, \"The problem with Internet quotat
While this simple game isn't much to look at, it's an example of how
easy it is to get something working in Ren'Py.
We'll add the pictures
in a little bit, but first, let's see how to define characters.
Characters
https://www.renpy.org/doc/html/quickstart.html 4/14
8/14/22, 2:33 PM Quickstart — Ren'Py Documentation
label start:
m "Good..."
"I can't bring myself to admit that it all went in one ear and out the other."
s "Are you going home now? Wanna walk back with me?"
m "Sure!"
The first and and second lines define characters. The first line
defines a character with the short name of "s", the
long name
"Sylvie", with a name that is shown in a greenish color. (The colors
are red-green-blue hex triples, as
used in web pages.)
The second line creates a character with a short name "m", a long name
"Me", with the name shown in a reddish
color. Other characters can be
defined by copying one of the character lines, and changing the short
name, long
name, and color.
We've also changed the say statements to use character objects instead
of a character name string. This tells
Ren'Py to use the characters
we defined.
Images
Main article: Displaying Images (displaying_images.html)
A visual novel isn't much of a visual novel without pictures. Here's another
scene from "The Question". This also
includes statements that show images
to the player. This can fully replace the previous section of script, if
you
want to try it out.
https://www.renpy.org/doc/html/quickstart.html 5/14
8/14/22, 2:33 PM Quickstart — Ren'Py Documentation
label start:
scene bg meadow
"After a short while, we reach the meadows just outside the neighborhood where we both
"It's a scenic view I've grown used to. Autumn is especially beautiful here."
"When we were children, we played in these meadows a lot, so they're full of memories.
m "Hey... Umm..."
"She turns to me and smiles. She looks so welcoming that I feel my nervousness melt aw
"Silence."
This segment of script introduces two new statements. The scene statement on
line 6 clears all images and
displays a background image. The show statements
on lines 16 and 26 display a sprite on top of the background,
and change the
displaying sprite, respectively.
In Ren'Py, each image has a name. The name consists of a tag, and optionally
one or more attributes. Both the
tag and attributes should begin with a
letter, and contain letters, numbers, and underscores. For example:
In the scene statement on line 6, the tag is "bg", and the attribute is
"meadow." By convention, background
images should use the tag bg.
In the first show statement on line 16, the tag is "sylvie", and the
attributes are "green" and "smile".
In the second show statement on line 26, the tag is "sylvie", and the
attributes are "green" and "surprised".
Only one image with a given tag can be shown at the same time. When a
second image with the same tag is
show, it replaces the first image, as
happens on line 26.
Ren'Py searches for image files in the images directory, which can be
found by selecting "images" in the "Open
Directory" section of the
launcher. Ren'Py expects character art to be an PNG or WEBP file,
while background art
should be a JPG, JPEG, PNG, or WEBP file.
The name of a file is very important – the extension is removed, the
file
name is forced to lowercase, and that's used as the image name.
For example, the following files, placed in the images directory, define the
following images.
Hide Statement.
Ren'Py also supports a hide statement, which hides the given image.
label leaving:
hide sylvie
"..."
It's actually pretty rare that you'll need to use hide. Show can be
used when a character is changing emotions,
while scene is used when
everyone leaves. You only need to use hide when a character leaves and
the scene
stays the same.
Image Statement.
Sometimes, a creator might not want to let Ren'Py define images
automatically. This is what
the image statement is for. It should
be at the top level of the file (unindented, and before label start),
and can be
used to map an image name to an image file. For example:
The image statement is run at init time, before label start and the rest
of the game script that interacts with the
player.
The image statement can also be used for more complex tasks, but that's
discussed elsewhere
(displaying_images.html).
Transitions
Main article: Transitions (transitions.html)
https://www.renpy.org/doc/html/quickstart.html 7/14
8/14/22, 2:33 PM Quickstart — Ren'Py Documentation
label start:
scene bg meadow
with fade
"After a short while, we reach the meadows just outside the neighborhood where we both
"It's a scenic view I've grown used to. Autumn is especially beautiful here."
"When we were children, we played in these meadows a lot, so they're full of memories.
m "Hey... Umm..."
with dissolve
"She turns to me and smiles. She looks so welcoming that I feel my nervousness melt aw
The with statement takes the name of a transition to use. The most
common one is dissolve which dissolves
from one screen to the
next. Another useful transition is fade which fades the
screen to black, and then fades in
the new screen.
scene bg meadow
with dissolve
Both the "bg meadow" and "sylvie green smile" images would be dissolved in
at the same time. To dissolve them
in one at a time, you need to write two
with statements:
scene bg meadow
with dissolve
with dissolve
https://www.renpy.org/doc/html/quickstart.html 8/14
8/14/22, 2:33 PM Quickstart — Ren'Py Documentation
scene bg meadow
with None
with dissolve
Positions
Main article: Transforms (transforms.html)
Creators can define their own positions, and event complicated moves,
but that's outside of the scope of this
quickstart.
Most Ren'Py games play music in the background. Music is played with the
play music statement. The play
music statement takes a filename that
is interpreted as an audio file to play. Audio filenames are interpreted
relative to the game directory. Audio files should be in opus, ogg vorbis,
or mp3 format.
For example:
When changing music, one can supply a fadeout and a fadein clause, which
are used to fade out the old
music and fade in the new music.
The queue music statement plays an audio file after the current file
finishes playing.
https://www.renpy.org/doc/html/quickstart.html 9/14
8/14/22, 2:33 PM Quickstart — Ren'Py Documentation
Music can be stopped with the stop music statement, which can also
optionally take a fadeout clause.
stop music
Sound effects can be played with the play sound statement. Unlike music, sound
effects do not loop.
When a filename is in the "game/audio" directory, and the name without the
file extension can be used as a Python
variable (that is, it begins with
a letter, and contains only letters, numbers, and underscores), it is possible
to play
that file without using quotes.
Pause Statement
The pause statement causes Ren'Py to pause until the mouse is clicked.
pause
If a number is given, the pause will end when that number of seconds
have elapsed.
pause 3.0
return
https://www.renpy.org/doc/html/quickstart.html 10/14
8/14/22, 2:33 PM Quickstart — Ren'Py Documentation
That's all you need to make a kinetic novel, a game without any
choices in it. Now, we'll look at what it takes to
make a game that
presents menus to the user.
menu:
"It's a videogame.":
jump game
jump book
label game:
jump marry
label book:
m "It's like an interactive book that you can read on a computer or a console."
jump marry
label marry:
This example shows how a menu can be used with Ren'Py. The menu statement
introduces an in-game choice. It
takes an indented block of lines, each
consisting of a string followed by a colon. These are the menu choices that
are
presented to the player. Each menu choice takes its own indented block of lines,
which is run when that menu
choices is chosen.
In this example, each of the two menu choices runs a single jump statement.
The jump statement transfers
control to the a label defined using the label
statement. After a jump, script statements following the label are run.
In the example above, after Sylvie asks her question, the player is presented
with a menu containing two choices.
If the player picked "It's a videogame.",
the first jump statement is run, and Ren'Py will jump to the game label.
This will cause the POV character to say "It's a story with pictures and music.",
after which Ren'Py will jump to the
marry label.
https://www.renpy.org/doc/html/quickstart.html 11/14
8/14/22, 2:33 PM Quickstart — Ren'Py Documentation
If there is no jump statement at the end of the block associated with the label,
Ren'Py will continue on to the next
statement. The last jump statement here is
technically unnecessary, but is included since it makes the flow of the
game
clearer.
Labels may be defined in any file that is in the game directory, and ends with
.rpy. The filename doesn't matter to
Ren'Py, only the labels contained inside
it. You can think of all the .rpy files as being equivalent to a single big
.rpy
file, with jumps used to transfer control. This gives you flexibility
in how you organize the script of a larger game.
While some games can be made by only using the statements given above,
other games require data to be stored
and recalled later. For example,
it might make sense for a game to remember a choice a player has made,
return
to a common section of the script, and act on the choice later. This
is one of the reasons why Ren'Py has
embedded Python support.
Here, we'll show how to store a flag containing information about a choice
the player has made. To initialize the
flag, use the default statement, before
label start.
label start:
The book flag starts off initialized to the special value False
(as with the rest of Ren'Py, capitalization matters),
meaning that
it is not set. If the book path is chosen, we can set it to True
using a Python assignment statement.
label book:
$ book = True
m "It's like an interactive book that you can read on a computer or a console."
jump marry
if book:
"Our first game is based on one of Sylvie's ideas, but afterwards I get to come up wit
https://www.renpy.org/doc/html/quickstart.html 12/14
8/14/22, 2:33 PM Quickstart — Ren'Py Documentation
if book:
"Our first game is based on one of Sylvie's ideas, but afterwards I get to come up wit
else:
Rarely, changes to Ren'Py will require you to make a change to your game's
script.
https://www.renpy.org/doc/html/incompatible.html (https://www.renpy.org/doc/html/incompatible.html) has
a list of
these changes.
Build Distributions.
From the front page of the launcher, choose "Build Distributions". Based
on the information contained in
options.rpy, the launcher will build one
or more archive files containing your game.
Test.
Lint is not a substitute for thorough testing. It's your
responsibility to check your game before it is released.
Consider asking
friends to help beta-test your game, as often a tester can find problems
you can't.
Release.
Once the game has been finished and tested, you should post the generated
archive files on the web
somewhere people can see them. (If you don't
have your own website, https://itch.io (https://itch.io) hosts a lot
of
visual novels.) Congratulations, you've released your first visual novel!
https://www.renpy.org/doc/html/quickstart.html 13/14
8/14/22, 2:33 PM Quickstart — Ren'Py Documentation
game.
More advanced vays of customizing the building of the distribution of your game
can be found in the Building
Distributions (build.html) section.
To get a feel for what Ren'Py is capable of, please play through the Tutorial,
and perhaps some of the games
featured on the Ren'Py website (https://www.renpy.org).
You may also want to read the rest of this manual, starting
with the GUI Customization
Guide (gui.html#gui).
Beyond that, we recommend checking out the Ren'Py section of the Lemma Soft Forums
(https://lemmasoft.renai.us/forums), which
has a section for asking questions, and a cookbook section with
libraries and examples meant for reuse. The Lemma Soft Forums are the
central hub of the Ren'Py community,
where we welcome new creators and the questions they bring.
Thank you for choosing the Ren'Py visual novel engine. We look forward to seeing
what you create with it!
https://www.renpy.org/doc/html/quickstart.html 14/14