#001: Creating your first Adventure for Ren'Py Project

Creating your first Adventure for Ren'Py Project

Welcome to the first in our series of How-To Guides.  This one will show you the step-by-step process to create a new empty Adventure for Ren'Py Project, which you can then use as a starting point to begin building your game.

Step 1 - Install & Open the Latest Stable Ren'Py SDK

First, download and install the latest version of the Ren'Py SDK from https://www.renpy.org/latest.html

Once installed, open it using its Application icon.

Step 2 - Choose “Create New Project”

This option is in the bottom left area of the Ren'Py launcher window.

Step 3 - Continue past the Information Screen

If the language shown is correct, just click Continue.


Step 4 - Choose a Project Name

Type your project name, then click Continue.  For this example, I'm using “My Project”

Step 5 - Screen Resolution

Select the Screen Resolution for your project, then press Continue.

Step 6 - Color Theme

Select the Color Theme for your project, then press Continue.

After a few moments, you should find yourself back on the PROJECTS screen.



Step 7 - Open Game Directory

Select the Screen Resolution for your project, then press Continue.

Step 8 - Download Adventure

Download the “Latest” Release from the Adventure for Ren'Py GitHub Repository.

Choose the Source Code (zip) option.

Once downloaded, unzip it into a temporary location.


Step 9 - Install Adventure into your Game

Inside the temporary folder, you will find a folder called “adventure” — simply move this entire folder (the folder itself, not its contents) into your project's “game” folder.


Step 10 - Add an Adventure Room into your Game’s Script

In the Ren'Py launcher, choose “game.rpy” from the list on the right, to edit it.

Assuming this is the default script Ren'Py generates for a new project, add the following code just before the comment above the final “return” statement.


label .loop: call adventure_input("demo room") if player_chooses_to("exit"): jump game_end jump .loop label game_end:

Save changes to the file.

Step 11 - Launch Your Project

Back in the Ren'Py launcher, choose Launch Project from the bottom right area of the window.

The game window should open, and the default main menu should appear.

Step 12 - Start the Game, and Click to get Beyond the Sample Dialogue

When the game begins, you will see the dialogue from Ren'Py’s sample character, Eileen, appear.  Just click to continue past these two lines.



Step 13 - Install the Adventure Icon

Adventure will notice that the game icon doesn’t match the chosen Adventure game icon.  You can choose to install the icon now, or press Keep Current Icon.

If you choose “Keep Current Icon,” you will be presented with a box containing instructions on how to specify your Project’s proper icon in your script.rpy file, which will prevent this box from popping up in the future.


Step 14 - Create a new Polygon

We’re going to create an imaginary door for our character to step though.  In order to do this, we need to add an interactable Polygon element.

To do this, click (one time only) the “Create New Polygon” icon at the top right of the Location Editor.


Step 15 - Add Points to the Polygon

Whenever a new Polygon has been created, you start out in "Add Point" mode.  So, simply draw our imaginary door by clicking once for each corner of the door, going in either a clockwise or counter-clockwise direction.

Step 16 - Save Changes

To save our room data, click the Save Changes link at the bottom of the Location Editor.

We only have one room right now, but keep in mind that this will save the changes of any and all rooms we’ve edited so far during this game session.

Step 17 - Change to Play Mode

Click the chess piece icon at the upper left of the Location Editor window.  This will switch to Play Testing Mode.  Whatever we click next will act according to the instructions in our script.rpy source code.

Step 18 - Go Through the Imaginary Door

Even though the Polygon Outline no longer shows up, it’s still there.  In a completed game, we would probably have a background graphic that shows a picture of the door, but in our test project, we have to imagine it is there.  Go ahead and click in the middle of the area wherre you drew the door in Step 15.

If everything went as planned, you should have just stepped out of the game and back into the Menu, that’s because the code earlier included:

    if player_chooses_to("exit"):
        jump game_end

The Adventure system matched the verb “Exit” the possible verbs of the polygon.  When a player_chooses_to expression maches a possible action for a click event, the code within that if statement executes.  In this case, that caused Ren'Py to jump to the label called game_end.

Step 19 - Quit the Demo & Start Crafting your Adventure

That’s all there is to it.  There’s a lot more to learn about Adventure, which will be covered in upcoming posts on this blog.  But you may now begin to developing your script, graphics, and location content for your game.

Congratulations!

We wish you the best of luck as you create your Adventure Game using Adventure for Ren'Py.

Comments

Popular posts from this blog

What is an Adventure Game?

#002: How Commands are Matched