Introduction: Visual Novel Maker Tutorial Using Ren’Py
Have you ever played a visual novel, choose your own adventure, dating simulator, or another similar type of game, and thought about making one yourself, only to feel discouraged by not knowing where to begin? Look no further, this tutorial will send you well on your way to basic coding and game development!
What is Ren'Py?
- A tool to help users build Visual Novel, RPG, Dating Sims, and other 2D Games.
- Ren'py uses powerful scripting languages to help deliver fantastic game abilities with Python and PyGame.
- Completely free and open source with cross-platform accessibility.
- Ren'py is NOT a visual tool, if you are looking for a visual tool, look into Novelty.
What is Python?
Python is a scripting language used to increase readability for coders with fewer syntax requirements.
What will this Tutorial cover?
- How to get started with the pre-built tutorials.
- How to start a basic game by introducing commands.
- How to finalize and share your creation.
Who will best benefit from this tutorial?
- Individuals looking to produce a game with little to no coding experience.
- Coders with interest in learning more about python.
Step 1: Download Ren'py
- Make a folder on your desktop for ease of accessibility to extract the program into.
- Begin by downloading the software from Ren’Py directly and simply follow the installation instructions exactly as listed in the Ren’Py web page.
Step 2: Step 2: Start Tutorial
- Click on the startup panel the Tutorial in the top left-hand corner and click launch project and play through to introduce yourself to the software.
- Be sure to read through all of the game informational directory panels.
Step 3: Step 3: Initialize Game Settings
- Go back to the home page directory panel and click Create New Project.
- Select your project directory location, or where you will be saving all of your game files onto your computer to reopen later. I recommend creating a new folder on your desktop for easy accessibility first, then selecting your directory on where you want your game to rest in . You can always change your directory and other settings under preferences.
- Name your Project.
- Next set up your text editor, Ren’Py recommends Editra, their own personal text editor. In this tutorial, I will also show you how to set up another text editor of your choice. I am using sublime, but other editors which use .rpy files can be used as well.
- Go to Preferences page, and under “Text Editor:, you have a choice between Editra recommended by Ren’py, system editor, or jEdit. I recommend using Sublime for your system editor because .rpy files are compatible and the interface is much more easy to follow than Editra.
- After choosing your editor, simply begin the initial game setup including GUI interface and screen resolution.
Next choose your GUI interface, or graphical user interface, essentially what the user will see when the game is complete. I recommend the new interface to better support current screen resolutions. Later on, you can directly modify the gui.rpy file if you would like to furtherly customize the look and color scheme of your game display.
Simply choose the highlighted resolution, for now, you can always change it later under preferences.
Step 4: Step 4: Coding Your Game
Now that you have your basic project file setup, it is time to actually begin adding substances into your game.
- Begin by opening all of your text files from the link on the startup page under your project file name. Depending on which text editor you selected in preferences, the text editor will pop up in a separate window and display all of the files, including script.rpy, options.rpy, gui.rpy, and screens.rpy.
- I recommend Simple Game Documentation to further assist in formatting the initial game set up like the above images.
- Now onto the actual script.rpy coding! Starting in the script.rpy file, this is where all of your game’s code will go including dialogue, images, sound, and decisions.
- First, I will discuss the outline code laid out in the initial script.rpy file to help you understand what everything does and where everything goes.
- Under line 3 and 4 in the code where it says # Declare characters used by this game. You will add any files of images here. To do so you simply declare the image the type of image and the name of the image equal to an image from your computer in either a .jpg or.png file. You must create these here so that you game no matter where can use these images many times.
For a background image: image bg someimage = “someimage.jpg”
For a character image: image character someexpression = “somexpression.jpg”
- Under the comment that originally stated # Declare characters used by this game. You will define your characters. This defines your character as a single variable you can call many times, perfect for creating dialogue, sets up the name of your character, and gives your character a certain text color.Your code will look something like this.
For a background image: define a = Character (‘CharacterName’, color = “#rgbvalue”)
- Next, to start any game in Ren’py, you need to use label start: to tell the program that you want to have the actual gameplay begin here. From there you can set up your scenery using commands found under Documentation such as
play music “musicfromcomputer.ogg” scene bg someimage with fade show character "charactername" and other commands.
- To add text to your game you can do one of two things, first place whatever you would like to say within double quotes, or assign a character with the words in double quotes as seen below.
“Write your opening dialogue.” or a "Write this character's dialogue"
- For creating a decision tree for the player, where your game can take on multiple routes utilize the basic setup below as follows: Your code will look something like this.
menu: “Dialogue or question”: jump route “Second dialogue or question etc.”: jump route2 label route: “Dialogue” jump route 3 label route 2: “Dialogue” jump route 3
- To end your game, simply type return, this will immediately end your gameplay for the player.
- The process above is relatively simple once you learn the commands. When you are ready to take on a more vigorous approach to coding and game design, feel free to look into the documentation and change the screens.rpy, options.rpy, and gui.rpy files. The online Documentation goes into more depth on how to get started changing those and is very useful in case you become stuck on remembering which command does what.
- To furtherly customize your game follow these links to gain more information about how to actually code the game.
- Python and Ren'Py Language dictionary for beginners
- GUI (Graphical User Interface) or what the game visually looks like to the player Documentation
- Other fun add-ons such as adding a music playlist, an image gallery, or image replays to enhance the game design can be found here
- Finally other customizing options such as how large font displays can be found here.
Step 5: Step 5: Releasing Your Game
- To end your game, update the Ren’py launcher.
- Then check script with lint to search for syntax errors found on the startup page.
- Build Distributions will archive your files into an accessible folder you can upload onto a web page.The essential code needed to create the game on the platform of your choice is made directly by Ren'py. For more information, visit the documentation build page on Ren'Py.
- Next retest your game with friends and family are also known as beta testing.
- Lastly, release your game on your own personal website or onto Itchi.io to let your game reach many visual novel enthusiasts.
You have now created your first visual novel game! Congratulations!