Page 1 of 1

I lost code for a minigame and can't find it ANYWHERE!

Posted: Wed Feb 28, 2024 5:28 am
by osgoodnight1
Backstory: A year ago, I found code for this click style minigame. I really wanted to use it for my VN because it was something interesting. I saved the code somewhere, but within that year I changed computers and moved overseas. I thought I transferred everything from my old computer, but I was wrong. I've been searching high and low for the code (even using a VPN) but still no luck.

Minigame description: The game contains two main parts- the randomized imagebutton that when you click it, it'll change position; and the imagebutton background that, when clicked, the game is over and you lose. You had to click the moving imagebutton a certain amount of times to win but if you didn't click the right amount of times or accidentally clicked the background you lost.

Question: Can someone help me find this code that has seemed to vanish off the face of the internet?

Re: I lost code for a minigame and can't find it ANYWHERE!

Posted: Wed Feb 28, 2024 6:56 am
by Imperf3kt
Might it be any of the games listed in this thread?
viewtopic.php?t=47820

Re: I lost code for a minigame and can't find it ANYWHERE!

Posted: Thu Feb 29, 2024 5:17 am
by osgoodnight1
Imperf3kt wrote: Wed Feb 28, 2024 6:56 am Might it be any of the games listed in this thread?
viewtopic.php?t=47820
Thank you for responding!

Yes, I have. Some games come close but aren't the exact one I was looking for. Any of the click and point games that are listed are too complex for what I'm going for and wouldn't fit well with the theme of my game. I don't want a minigame that feels put in for the sake of having a minigame. The places I'll be putting the minigame in are for times when you're fighting an evil spirit. It's almost like "whack-a-mole" I guess, is what I'm going for.

Re: I lost code for a minigame and can't find it ANYWHERE!

Posted: Sun Mar 03, 2024 7:25 am
by Another_Tom
osgoodnight1 wrote: Thu Feb 29, 2024 5:17 am Yes, I have. Some games come close but aren't the exact one I was looking for. Any of the click and point games that are listed are too complex...
Shouldn't be too hard to code, maybe this helps/gives you an idea?

Code: Select all

define e = Character("Eileen")

# define your images
image background_clicker:
    Solid ("#0000ff")
    
image foreground_clicker:
    Solid ("#fff")
    size (400,350)
    
# define your transforms    
transform clicker_move:
        choice:
            # just left and right 
            xalign 0.0 yalign 0.5
            block:
                ease 2.0 xalign 1.0
                ease 2.0 xalign 0.0
                repeat 
        choice:
        # moving around the edge  
            xalign 0.0 yalign 0.0
            block:
                ease 2.0 xalign 1.0
                ease 1.5 yalign 1.0
                ease 1.5 xalign 0.0
                ease 2.0 yalign 0.0
                repeat 
                
        choice:
            # zig zag
            xalign 1.0 yalign 1.0
            block:
                ease 1.0 yalign 0.0 xalign 0.0
                ease 1.3 xalign 1.0 yalign 1.0
                ease 1.0 xalign 0.0
                ease 1.0 yalign 0.0 xalign 1.0
                repeat
                
# simple screen     
screen mini_clicker():
    
    # the background button
    imagebutton: 
        idle "background_clicker"
        action Return("Failed")
    
    imagebutton at clicker_move:
        focus_mask True 
        idle "foreground_clicker" 
        action Return ("Success")
        
    
    
# The game starts here.

label start:

    e "Click on the white, moving square."
    call screen mini_clicker
    # remember the return var is "_return"
    e "[_return]"
    jump start 

Re: I lost code for a minigame and can't find it ANYWHERE!

Posted: Wed Mar 13, 2024 3:35 am
by osgoodnight1
Another_Tom wrote: Sun Mar 03, 2024 7:25 am
osgoodnight1 wrote: Thu Feb 29, 2024 5:17 am Yes, I have. Some games come close but aren't the exact one I was looking for. Any of the click and point games that are listed are too complex...
Shouldn't be too hard to code, maybe this helps/gives you an idea?

Code: Select all

define e = Character("Eileen")

# define your images
image background_clicker:
    Solid ("#0000ff")
    
image foreground_clicker:
    Solid ("#fff")
    size (400,350)
    
# define your transforms    
transform clicker_move:
        choice:
            # just left and right 
            xalign 0.0 yalign 0.5
            block:
                ease 2.0 xalign 1.0
                ease 2.0 xalign 0.0
                repeat 
        choice:
        # moving around the edge  
            xalign 0.0 yalign 0.0
            block:
                ease 2.0 xalign 1.0
                ease 1.5 yalign 1.0
                ease 1.5 xalign 0.0
                ease 2.0 yalign 0.0
                repeat 
                
        choice:
            # zig zag
            xalign 1.0 yalign 1.0
            block:
                ease 1.0 yalign 0.0 xalign 0.0
                ease 1.3 xalign 1.0 yalign 1.0
                ease 1.0 xalign 0.0
                ease 1.0 yalign 0.0 xalign 1.0
                repeat
                
# simple screen     
screen mini_clicker():
    
    # the background button
    imagebutton: 
        idle "background_clicker"
        action Return("Failed")
    
    imagebutton at clicker_move:
        focus_mask True 
        idle "foreground_clicker" 
        action Return ("Success")
        
    
    
# The game starts here.

label start:

    e "Click on the white, moving square."
    call screen mini_clicker
    # remember the return var is "_return"
    e "[_return]"
    jump start 
Thank you! I will try it out and let you know how it goes. I will eventually need to have it keep track of if the person failed or not, so I can have different dialogue for the outcome.

Re: I lost code for a minigame and can't find it ANYWHERE!

Posted: Sun Mar 17, 2024 5:36 am
by Another_Tom
osgoodnight1 wrote: Wed Mar 13, 2024 3:35 am I will eventually need to have it keep track of if the person failed or not, so I can have different dialogue for the outcome.
And I thought you wanted to point out that it's not a square at all, because 50 pixels are missing :lol:
Joking asside, how about this then?

Code: Select all

define e = Character("Eileen")

# define your images
image background_clicker:
    Solid ("#0000ff")
    
image foreground_clicker:
    Solid ("#fff")
    size (400,400)
    
image foreground_clicker_hover:
    Solid ("#66ff66")
    size (400,400)
    
    
    
# define your transforms    
transform clicker_move:
    parallel:
        choice:
            # just left and right 
            xalign 0.0 yalign 0.5
            block:
                ease 2.0 xalign 1.0
                ease 2.0 xalign 0.0
                repeat 
        choice:
            # moving around the edge  
            xalign 0.0 yalign 0.0
            block:
                ease 2.0 xalign 1.0
                ease 1.5 yalign 1.0
                ease 1.5 xalign 0.0
                ease 2.0 yalign 0.0
                repeat 
                
        choice:
            # zig zag
            xalign 1.0 yalign 1.0
            block:
                ease 1.0 yalign 0.0 xalign 0.0
                ease 1.3 xalign 1.0 yalign 1.0
                ease 1.0 xalign 0.0
                ease 1.0 yalign 0.0 xalign 1.0
                repeat
    # zoom the square a bit to have little more challenge
    parallel:
        linear 0.5 zoom 0.5
        pause 1.0
        linear 0.5 zoom 1.0
        pause 1.5
        repeat
    
transform clicker_zoom:
    xalign 0.5 yalign 0.5
    block:
        zoom 0.0
        ease 0.5 zoom 3.0
        ease 1.0 alpha 0.0
    
# simple screen     
screen mini_clicker(click=1):
    
    # the background button
    imagebutton: 
        idle "background_clicker"
        action Return(False)
    
    # the foreground button (evil spirit ghost)
    imagebutton at clicker_move:
        focus_mask True 
        idle "foreground_clicker"
        hover "foreground_clicker_hover"
        action Return (True)
        
    # times to click
    text "Just [click] time(s) to go.":
        xalign 0.5
    
screen clicker_yay(message):
    # this screen is like a notify message and hide itself after a second
    zorder 5
    text message at clicker_zoom
    timer 1.0 repeat False action Hide()
    
    
    
# The game starts here.

label start:
    scene background_clicker
    "Click on the white moving square."
    # set times to click
    $ click = 5
    while click >0:
        call screen mini_clicker(click) with dissolve
        # remember the return var is "_return"
        
        if _return is False:
            "Aww, you failed."
            jump clicker_end
    
        $ click -=1
        $ yay_message = renpy.random.choice(["GREAT!", "AWESOME!", "COOL!"])
        show screen clicker_yay(yay_message)
        
    "Good game!"
    
    
label clicker_end:        
    "Click to play again."
    
    jump start