Creating A New Project
1. Launch Ren ‘Py.
2. Click on Create New Project.
3. Follow the steps asked in the program.
Getting Basic Resources
1. Start by finding a background, two sprites (two character images with a transparent background), two different music files (download an mp3 file). Make sure to name them with easy to remember and type names (eg. school, girl, sad_music).
2. Transfer them into your Game folder (it’s in your projects directory). Click on Game Name > Game and drag the files there.
Writing the Code
1. Click on script.rpy under Edit File.
2. I recommend using Editra for beginners.
Images
3. Declare (basically just type) images into its “memory” by typing image file alias = “filename”.
Characters
5. Declare characters to be used in the game by typing define alias = Character('Name', color="hex code”).
6. Type label start: in another line after your images declaration part.
7. Start another line for each command.
8. Type play music “filename.mp3” fadein 1 (second for music to fade in).
9. Type scene image alias to show the background image.
10. Type show image alias at position (center, left, right) to show your sprite (character) and just repeat if you want to add another sprite.
Basic Script
11. Input the alias for your character “girl” (g) and the speech like this.
13. Type menu: on another line to state choices to be shown.
14. Type the speech.
"How does it work?":
16. Type another speech choice.
Code: Select all
menu:
"How does it work?":
jump girlboyexplains
"Psh... I already know how to use it, idiots.":
jump girlboygetsmad
18. Type label label name:
19. Input the character alias and speech you want the character to respond to the choice (eg. You: “How does it work?” Girl: “Search up tutorials in the internet.”) and type return.
20. It should now look like this.
Code: Select all
menu:
"How does it work?":
jump girlboyexplains
"Psh... I already know how to use it, idiots.":
jump girlboygetsmad
label girlboyexplains:
g "Search up tutorials in the internet."
b "And you will find out!"
22. To put something like good end or bad end, add image black = "#000" to the image declaration part to represent the background color. Then, at the very end of each of your label code, before return, put:
Code: Select all
show black
centered "{size=+10}Good End{/size}"
Code: Select all
#here are where images are declared
image girl = "girl.jpg"
image boy = "boy.jpg"
image school = "school.jpg"
# Declare characters used by this game.
define g = Character('Girl', color="#000")
define b = Character('Boy', color="#000")
# The game starts here.
label start:
play music "Happy.mp3" fadein 1
scene school
show girl at center
g "You've created a new Ren'Py game."
b "Once you add a story, pictures, and music, you can release it to the world!"
menu:
"How does it work?":
jump girlboyexplains
"Psh... I already know how to use it, idiots.":
jump girlboygetsmad
label girlboyexplains:
g "Search up tutorials in the internet."
b "And you will find out!"
show black
centered "{size=+10}Good End{/size}"
return
label girlboygetsmad:
stop music
play music "Suspicion.mp3" fadein 3
g "Oh my..."
"Girl rolls her eyes."
b "Show us then."
"Boy crosses his arms."
show black
centered "{size=+10}Bad End{/size}"
return
But if you didn’t get it right…. Don’t worry! Just read the instructions again and revise the mistakes. If you’re too lazy to find out your mistakes manually, try launching the game from Ren ‘Py. A prompt will show the lines you did wrong. Don’t give up!
For those of you who got it, spice your game up by adding advanced functions I will update the original post in accordance to your suggestions *salutes everyone*
I'd really appreciate it if I was credited for the tutorial in your very first game, since I did spent two good hours on typing this up And do send your games to me! I'm excited to try them out
I love y'all <3
Byeeeeee! *flys away*