"Slicing" images

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
Doeny
Regular
Posts: 145
Joined: Wed Sep 07, 2022 8:28 pm
Contact:

"Slicing" images

#1 Post by Doeny »

Hi, I'd like to ask if there's a way top create some mini-game like Fruit Ninja using renpy. Basically to write a code that detects if you're holding a mousebutton and sweeping throught an image?

User avatar
_ticlock_
Miko-Class Veteran
Posts: 910
Joined: Mon Oct 26, 2020 5:41 pm
Contact:

Re: "Slicing" images

#2 Post by _ticlock_ »

Doeny wrote: Sat Nov 19, 2022 12:00 am Hi, I'd like to ask if there's a way top create some mini-game like Fruit Ninja using renpy. Basically to write a code that detects if you're holding a mousebutton and sweeping throught an image?
It is possible. You can do that using CDD. You can use pygame events to detect mouse position and if it's pressed. You need logic to figure out the slice line, how to move displayable, and how to slice them(it could be quite hard though). I don't see potential problems for PC, but I am not so sure about touch-based devices.

Doeny
Regular
Posts: 145
Joined: Wed Sep 07, 2022 8:28 pm
Contact:

Re: "Slicing" images

#3 Post by Doeny »

_ticlock_ wrote: Sat Nov 19, 2022 12:50 am
Doeny wrote: Sat Nov 19, 2022 12:00 am Hi, I'd like to ask if there's a way top create some mini-game like Fruit Ninja using renpy. Basically to write a code that detects if you're holding a mousebutton and sweeping throught an image?
It is possible. You can do that using CDD. You can use pygame events to detect mouse position and if it's pressed. You need logic to figure out the slice line, how to move displayable, and how to slice them(it could be quite hard though). I don't see potential problems for PC, but I am not so sure about touch-based devices.
I'll check it out, thanks!

Post Reply

Who is online

Users browsing this forum: No registered users