Page 3 of 5

Re: 14 mini games

Posted: Sat Apr 27, 2019 7:30 am
by bambino358
Hi,
I'm trying to use minigame Fable 2 and I have a question. How to make a point move faster?
The basic move is too slow for me so I would like to make it faster but have no idea how to do it.

This is my script:

Code: Select all

init 15 python:
    fable_minigame_bar = 0
    fable_minigame_score = 0
    fable_you_press_button = 0
init:
    transform fable_point_move(frp):
        subpixel True
        rotate_pad True
        align(0.5,-0.53)
        rotate frp
        
screen fable_2_minigame1:
    add "minigame/Fable_bar.png" align(0.5,0.5)
    add "minigame/Fable_point.png" at fable_point_move(fable_minigame_bar)
    text "[fable_minigame_score]" align(0.5,0.1)
    text "[fable_minigame_bar]" align(0.5,0.2)
    text "[fable_you_press_button]" align(0.5,0.3)
    
    if fable_minigame_bar >= -14 and fable_minigame_bar <= 14:
        key "K_SPACE":
            if fable_you_press_button == 0:
                if fable_minigame_score < 14:
                    action [SetVariable("fable_minigame_score", fable_minigame_score + 1), SetVariable("fable_you_press_button", fable_you_press_button + 1), Show("you_press_button_good")]
                else:
                    action Jump("end")
            elif fable_you_press_button == 1:
                action SetVariable("fable_minigame_score", fable_minigame_score + 0)
    else:
        key "K_SPACE" action [SetVariable("fable_minigame_score", 0), Show("you_press_button_bad")]
    
screen fable_timer_left:
    timer 0.00001 repeat True action [If(fable_minigame_bar >= -90, SetVariable("fable_minigame_bar", fable_minigame_bar - 1)),If(fable_minigame_bar == -90, Hide("fable_timer_left"), Show("fable_timer_right")), If(fable_minigame_bar == -90, SetVariable("fable_you_press_button", 0))]
screen fable_timer_right:
    timer 0.00001 repeat True action [If(fable_minigame_bar <= 90, SetVariable("fable_minigame_bar", fable_minigame_bar + 1)),If(fable_minigame_bar == 90, Hide("fable_timer_right"), Show("fable_timer_left")), If(fable_minigame_bar == 90, SetVariable("fable_you_press_button", 0))]
    
screen you_press_button_good:
    text "{color=#1e8e00}Good Work!{/color}" at fable_move_good
    timer 1.0 action Hide("you_press_button_good")
screen you_press_button_bad:
    #hbox at fable_move_bad:
    text "{color=#950000}Ups...\nTry Again.{/color}" at fable_move_bad
    timer 1.0 action Hide("you_press_button_bad")
transform fable_move_good:
    align(0.5,0.5)
    linear 0.05 zoom 1.3
    linear 0.5 zoom 1.0 alpha 0.0
transform fable_move_bad:
    align(0.5,0.5)
    linear 0.04 xalign 0.5
    linear 0.06 xalign 0.495
    linear 0.06 xalign 0.515
    linear 0.06 xalign 0.5
    linear 0.5 alpha 0.0
I tried to change the Timer but it doesn't seem to work...

Thank you

Re: 14 mini games

Posted: Sun Apr 28, 2019 9:28 am
by Andredron

Code: Select all

screen fable_timer_left:
    timer 0.00001 repeat True action [If(fable_minigame_bar >= -90, SetVariable("fable_minigame_bar", fable_minigame_bar - 1)),If(fable_minigame_bar == -90, Hide("fable_timer_left"), Show("fable_timer_right")), If(fable_minigame_bar == -90, SetVariable("fable_you_press_button", 0))]
screen fable_timer_right:
    timer 0.00001 repeat True action [If(fable_minigame_bar <= 90, SetVariable("fable_minigame_bar", fable_minigame_bar + 1)),If(fable_minigame_bar == 90, Hide("fable_timer_right"), Show("fable_timer_left")), If(fable_minigame_bar == 90, SetVariable("fable_you_press_button", 0))]
    


Speed

Code: Select all


screen fable_timer_left:
    timer 0.00001 repeat True action [If(fable_minigame_bar >= -100, SetVariable("fable_minigame_bar", fable_minigame_bar - 1)),If(fable_minigame_bar == -100, Hide("fable_timer_left"), Show("fable_timer_right")), If(fable_minigame_bar == -100, SetVariable("fable_you_press_button", 0))]
screen fable_timer_right:
    timer 0.00001 repeat True action [If(fable_minigame_bar <= 100, SetVariable("fable_minigame_bar", fable_minigame_bar + 1)),If(fable_minigame_bar == 100, Hide("fable_timer_right"), Show("fable_timer_left")), If(fable_minigame_bar == 100, SetVariable("fable_you_press_button", 0))]
    /code]
   
  
  90 and - 90 speed bar
 
 +1 - 1  size bar delit

Re: 14 mini games

Posted: Tue Apr 30, 2019 3:28 pm
by bambino358
Thank you. Now I feel like an idiot :).

Anyway... It works. Great!

Re: 16 mini game Renpy

Posted: Thu May 23, 2019 3:52 pm
by sonictoad
This is going to sound like a stupid question but--

I want to use that "Search for Items" minigame, first one in the list. Except that there's no "game.rpy" file in my directory. I have the latest version of the engine and I'm using Editra, is this only in Atom or something?

Re: 16 mini game Renpy

Posted: Fri May 24, 2019 6:14 am
by Andredron
sonictoad wrote: Thu May 23, 2019 3:52 pm This is going to sound like a stupid question but--

I want to use that "Search for Items" minigame, first one in the list. Except that there's no "game.rpy" file in my directory. I have the latest version of the engine and I'm using Editra, is this only in Atom or something?

It is not necessary to have this file, just see how in the example to call the game, and in your project, where you also need to call.

Re: 16 mini game Renpy

Posted: Wed May 29, 2019 9:51 am
by sonictoad
Andredron wrote: Fri May 24, 2019 6:14 am
sonictoad wrote: Thu May 23, 2019 3:52 pm This is going to sound like a stupid question but--

I want to use that "Search for Items" minigame, first one in the list. Except that there's no "game.rpy" file in my directory. I have the latest version of the engine and I'm using Editra, is this only in Atom or something?

It is not necessary to have this file, just see how in the example to call the game, and in your project, where you also need to call.
Oh ok! So would this just go in the script.rpy file where virtually all of the game's code is? Or should I make a whole new script file (let's call it game.rpy to keep it simple) then call it from script.rpy when the player reaches the appropriate jump?

Re: 16 mini game Renpy

Posted: Wed May 29, 2019 10:43 pm
by Andredron
sonictoad wrote: Wed May 29, 2019 9:51 am
Andredron wrote: Fri May 24, 2019 6:14 am
sonictoad wrote: Thu May 23, 2019 3:52 pm This is going to sound like a stupid question but--

I want to use that "Search for Items" minigame, first one in the list. Except that there's no "game.rpy" file in my directory. I have the latest version of the engine and I'm using Editra, is this only in Atom or something?

It is not necessary to have this file, just see how in the example to call the game, and in your project, where you also need to call.
Oh ok! So would this just go in the script.rpy file where virtually all of the game's code is? Or should I make a whole new script file (let's call it game.rpy to keep it simple) then call it from script.rpy when the player reaches the appropriate jump?
The code of the game, for example, is written in a separate game.rpy file and is completely thrown into the project. You look then the code in script.rpy there mini game is called so

call screen minigame
Or
show screen minigame

And variables, they start with $ or python, don't forget to add first

Re: 16 mini game Renpy

Posted: Sun Dec 13, 2020 1:21 pm
by mattocean
Hello,

first, thank you for creating the Find items mini game. I wanted to use it but I get error message. I would like to ask you to help me. Please be so kind. Why do I get the error message when running the game with your script.

"Invalid syntax maxLen + = 1"

I did put the code in the game folder and calling like this

$ InitGame("bg_room", 5.0, True, (735, 300), "figure1", (640, 226), "figure2", (288, 38), "figure3", (115, 260), "figure4")
$ StartGame()

I hope to get an answer from you soon.

Re: 16 mini game Renpy

Posted: Mon Dec 14, 2020 4:44 pm
by _ticlock_
Hi, Andredron,

Thank you for your time and effort in making this selection. It is very useful.

Re: 16 mini game Renpy

Posted: Wed Dec 30, 2020 2:34 am
by Renpie
Fable minigame is nice,

I added variable for min and max values of that area where you have to push so it's easy to change it, also added variable to change the speed of the ball. Also combined them to one screen as there was something weird going on with the variables, somehow changes made in one screen didn't update on another.

Re: 16 mini game Renpy

Posted: Thu May 27, 2021 11:27 am
by MoonByte
All of these are amazing!
I have a small question in regard to the memory game though
I have two different characters that would play that game with the PC and I want each to use their own cards (like, Character A has you sort flowers, Character B has you sort animals).
Is there a way to tell set it up that I have 10 images in the folder and I set a certain variable or something that the game only uses either 1-5 or 6-10?

Re: 16 mini game Renpy

Posted: Thu May 27, 2021 4:04 pm
by Andredron
MoonByte wrote: Thu May 27, 2021 11:27 am All of these are amazing!
I have a small question in regard to the memory game though
I have two different characters that would play that game with the PC and I want each to use their own cards (like, Character A has you sort flowers, Character B has you sort animals).
Is there a way to tell set it up that I have 10 images in the folder and I set a certain variable or something that the game only uses either 1-5 or 6-10?
Honestly, I would have suggested to you, but for a long time I haven’t sat down for a python, and I have already forgotten a lot, when a major one took up the project as a translator and scriptor, and not as a programmer.

Re: 16 mini game Renpy

Posted: Sat Jun 19, 2021 2:56 am
by Feleven
Any chance someone could reupload "3 in 1 row"?
Link is dead so obviously all images etc. are gone.

Re: 16 mini game Renpy

Posted: Sat Jun 26, 2021 6:46 pm
by Andredron
Feleven wrote: Sat Jun 19, 2021 2:56 am Any chance someone could reupload "3 in 1 row"?
Link is dead so obviously all images etc. are gone.
https://vk.com/wall-7553243_41708?post_add#post_add

Re: 16 mini game Renpy

Posted: Mon Jun 28, 2021 11:10 am
by Feleven
Thanks for the reply but unfortunately the link found there is dead as well. When you click on "Kri2.rar" it sends you there: https://vk.com/doc28338738_463390421?ha ... dc674af1dd