Simple minigames (Screen Language only).
Forum rules
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Re: Simple minigames (Screen Language only).
Hello~
Hm, so what's the problem with timer? Is it work at all, if so then what it did wrong? And what's the code you have?
Hm, so what's the problem with timer? Is it work at all, if so then what it did wrong? And what's the code you have?
- LiveTurkey
- Regular
- Posts: 109
- Joined: Tue Dec 27, 2016 10:50 pm
- Location: Brooklyn
- Contact:
Re: Simple minigames (Screen Language only).
I have strange bug where only something like 5-10% of my clicks register for the memory game. I will keep clicking and clicking random cards and eventually one of them will turn over. It seems to be completely random.
This problem doesn't occur when I do text mode. The game works perfectly in text mode. But in image mode, it seems to completely break down. Any idea why this is happening?
EDIT: I read through the thread and it turned out someone else has my exact same problem
They solved it by changing the gui.button height.
This problem doesn't occur when I do text mode. The game works perfectly in text mode. But in image mode, it seems to completely break down. Any idea why this is happening?
EDIT: I read through the thread and it turned out someone else has my exact same problem
So it turns out it isn't random but when I was randomly clicking all over the cards, it only activated when I clicked the very top.
They solved it by changing the gui.button height.
Where is the gui.button height variable, do you know? I found 10 or so lines with "gui.button_properties()" in the screens file but which do I change and how do I change the height specifically? Also, do you happen to know what the implications of this bug is / why it's happening?
Discord -> https://discord.gg/KPRktG2
Re: Simple minigames (Screen Language only).
Oh, well while I tried to quote Xerofit51's post you've found it yourself. Try to set height property for the buuton in memo_scr screen.
- LiveTurkey
- Regular
- Posts: 109
- Joined: Tue Dec 27, 2016 10:50 pm
- Location: Brooklyn
- Contact:
Re: Simple minigames (Screen Language only).
I found it. In gui.rpy I changed
Code: Select all
define gui.button_height = 54
Code: Select all
define gui.button_height = None
Discord -> https://discord.gg/KPRktG2
Re: Simple minigames (Screen Language only).
Glad you solve this.
Hee-hee, now I could quote both of you...))
- LiveTurkey
- Regular
- Posts: 109
- Joined: Tue Dec 27, 2016 10:50 pm
- Location: Brooklyn
- Contact:
Re: Simple minigames (Screen Language only).
Are we allowed to use this code in commercial projects? Any specific attribution required?
Discord -> https://discord.gg/KPRktG2
Re: Simple minigames (Screen Language only).
Yes, this code samples are free to use (as is or modified) for any project (comercial or not).
Re: Simple minigames (Screen Language only).
Hi Alex! Thanks for the codes!
My question is: can I make Memoria game match two images, which are different? (for example: there is a card with an image of something and the corresponding card would be with what is this thing called, so there is a need of two separate images for one pair of cards).
My question is: can I make Memoria game match two images, which are different? (for example: there is a card with an image of something and the corresponding card would be with what is this thing called, so there is a need of two separate images for one pair of cards).
Re: Simple minigames (Screen Language only).
Nevermind, solved it using an extra list :3
Re: Simple minigames (Screen Language only).
Not sure about extra list, but you can add another key (like 'c_img') for card description in a 'cards_list', so cards with the same 'c_value' might have different images set by 'c_img'. Then show the cards images in 'memo_scr' screen using this new key 'c_img'.
Like
Code: Select all
image apple:
"apple.png"
image pear:
"pear.png"
Code: Select all
add card["c_img"] # will show image
Code: Select all
label memoria_game:
$ cards_list = [
{"c_number":0, "c_value": 'A', 'c_img":'apple', "c_chosen":False},
{"c_number":1, "c_value": 'A', 'c_img":'pear', "c_chosen":False},
]
Re: Simple minigames (Screen Language only).
Yup yup, I used another key in there too. And a sort-of-case (match_names), to help with creating name list after shuffling the value one. Everything works fine c:
Code: Select all
$ values_list = cards_shuffle(values_list)
$ name_list = []
python:
for i in range (0, len(values_list)):
name_list.append(match_names(values_list[i]))
$ cards_list = []
python:
for i in range (0, len(values_list) ):
cards_list.append ( {"c_number":i, "c_value": values_list[i], "c_chosen":False, "c_name": name_list[i]} )
Re: Simple minigames (Screen Language only).
Your 1v1 battle game lead me to a full 1v1 combat system. Based on movements and some simple stats (Str, Dex and Def). I got tons of headaches trying to find a battle system and was really simple doing one using your template.
Thanks for those examples !
Thanks for those examples !
Do I live in a friendly or a hostile universe? Which is it? Is it a universe that is filled with hostility and anger and people wanting to hate each other and people wanting to kill each other, is that what you see?Because when you see the world that way that’s exactly what you will create for yourself in your life.
Re: Simple minigames (Screen Language only).
I'm glad it was useful for you. Good luck with you project...
- bubski_sketches
- Newbie
- Posts: 2
- Joined: Wed Jun 26, 2019 6:38 pm
- Contact:
Re: Simple minigames (Screen Language only).
Hey Alex!
I was wondering, how can I space out the cards so they don't overlap on the number game?
Thanks a bunch for making these by the way, your a lifesaver!
I was wondering, how can I space out the cards so they don't overlap on the number game?
Thanks a bunch for making these by the way, your a lifesaver!
Who is online
Users browsing this forum: piinkpuddiin