Please help, I'm desperate.
How can I create a simple object (rectangle) that I can move with visible movement animation? I used RoundRect() but I couldn't get the movement animation.
I am not interested in ATL animation like "transform", animation of objects in "label" via "show at" and not interested in animation via "label" at all. I only want to move objects inside the "screen".
I'd like to figure out renpy.displayable, but I find it complicated. Can anyone give a minimal template for creating a rectangle via the renpy.displayable class that I can later move with animation? That is, it should be a class that I can use and create any number of rectangles. Just the simplest example that I can build off of in terms of learning how renpy.displayable works. Please.
Which is easier to learn: renpy.displayable or using pygame?
Which will work better: renpy.displayable or using pygame?
Creating simple dynamic objects.
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.
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.
- m_from_space
- Eileen-Class Veteran
- Posts: 1128
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Creating simple dynamic objects.
I mean ATL transforms are really neat when it comes to moving and animating stuff, because you don't have to take care of timing or framerate, Renpy does it for you.
About that rectangle. If you don't want to use pygame or a creator-defined displayable, just create an area filled with a color and place another area inside that has padding. It's all about illusions, you know.
Code: Select all
screen rectangles():
use myrect(100, 200, 300, 50)
use myrect(500, 500, 600, 100)
screen myrect(x, y, w, h):
frame:
background Solid("#f00")
padding (1, 1)
pos (x, y)
xysize (w, h)
frame:
background Solid("#000")
xfill True yfill True
label start:
show screen rectangles
- m_from_space
- Eileen-Class Veteran
- Posts: 1128
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Creating simple dynamic objects.
If you want rectangles that are transparent, just do it like this, using the attached image (it's a 100x100 transparent PNG with a 1 pixel white border).
Code: Select all
screen rectangles():
use myrect(100, 200, 300, 50)
use myrect(500, 500, 600, 100)
screen myrect(x, y, w, h):
frame:
# using 2 or more instead of 1 makes sure we have no blurry lines
background Frame("rectangle", 2, 2, 2, 2)
pos (x, y)
xysize (w, h)
- Attachments
-
- rectangle.png (726 Bytes) Viewed 3401 times
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot]