Is there a fill in the blank mini game?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
iamcloudy90
Newbie
Posts: 9
Joined: Thu Feb 08, 2018 12:11 pm
Contact:

Is there a fill in the blank mini game?

#1 Post by iamcloudy90 »

I was hoping to make a game with a mini game that asks the player to fill up the missing words in the blanks and then if it's correct the game will show it's output and add additional points for the "good ending" points for the route he chose. is there any way to do this?


BTW sorry im still a newbie but i'm trying my best

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Is there a fill in the blank mini game?

#2 Post by rayminator »

I can't really help much but I think this might help in one way or another

Code: Select all

define pov = Character("[povname]")

python:
    povname = renpy.input("What is your name?")
    povname = povname.strip()

    if not povname:
         povname = "Pat Smith"

pov "My name is [povname]!"

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Is there a fill in the blank mini game?

#3 Post by xavimat »

You can use renpy.input()
The example by rayminator uses that function for the povname, but you can use it to ask for words.
https://renpy.org/doc/html/input.html
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

iamcloudy90
Newbie
Posts: 9
Joined: Thu Feb 08, 2018 12:11 pm
Contact:

Re: Is there a fill in the blank mini game?

#4 Post by iamcloudy90 »

is there any other way like there there are blanks and the player will fill them up?

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Is there a fill in the blank mini game?

#5 Post by xavimat »

Yes, you can create your own screen and include "input" in it.
https://www.renpy.org/doc/html/screens.html#input
You can position different words in it and the input box where you need it.
A simple example:

Code: Select all

screen fillthegap(phrase):
    frame:
        align (.5, .4)
        padding (20, 25)
        has hbox
        spacing 10
        for i in phrase.split():
            if i.startswith("*"):
                input length 10  # Maximum number of characters
            else:
                text i

label start:
    scene black with None
    call screen fillthegap("one two three *four five")
    if _return == "four":
        "Yes"
    else:
        "Oh, no"
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

iamcloudy90
Newbie
Posts: 9
Joined: Thu Feb 08, 2018 12:11 pm
Contact:

Re: Is there a fill in the blank mini game?

#6 Post by iamcloudy90 »

oh thanks, is there any tutorial link on how to add mini games in a game?

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Is there a fill in the blank mini game?

#7 Post by xavimat »

What do you mean "minigames"?
You can add screens in the point of the game you want.
Do you need more complex behavior? Describe what do you need and maybe we can help.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

iamcloudy90
Newbie
Posts: 9
Joined: Thu Feb 08, 2018 12:11 pm
Contact:

Re: Is there a fill in the blank mini game?

#8 Post by iamcloudy90 »

i was thinking of making a mini game where the player inputs fill in the blank answers and the good ending will be reached depending on how many correct answers the player had. (of course along with the proper choices of responds through out the story)

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Is there a fill in the blank mini game?

#9 Post by xavimat »

iamcloudy90 wrote: Wed Feb 28, 2018 1:41 pmi was thinking of making a mini game where the player inputs fill in the blank answers and the good ending will be reached depending on how many correct answers the player had. (of course along with the proper choices of responds through out the story)
The code I suggested can be used for that. Put a variable to add points with every correct answer.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

iamcloudy90
Newbie
Posts: 9
Joined: Thu Feb 08, 2018 12:11 pm
Contact:

Re: Is there a fill in the blank mini game?

#10 Post by iamcloudy90 »

ok thanks a lot,

Post Reply

Who is online

Users browsing this forum: Google [Bot], Yone28