Animation with dots, lines, bezier curves

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
User avatar
rururubell
Newbie
Posts: 13
Joined: Mon Sep 30, 2019 4:00 am
Deviantart: rururubell
Contact:

Animation with dots, lines, bezier curves

#1 Post by rururubell »

Hello! I want to create game with animated BG's. That's example what I want do do - https://www.youtube.com/watch?v=GXTFe4X-u8s

I read about ATL a little. And now I can make moving clouds, and I can change transparency level of layers (and make sun glare effects on screen).

But how can I made mowing wires, shaked by wind? And flying planes? How can I draw lines, bezier curves, dots and animate them? Is that possible? Can I get an example of something, that looks like I want?
Sorry for my English!

rames44
Veteran
Posts: 233
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: Animation with dots, lines, bezier curves

#2 Post by rames44 »

It’s possible that the best approach might be a “Creator Defined Displayable”. https://www.renpy.org/doc/html/udd.html

This requires some Python knowledge, but is the most powerful of the Displayable options.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Animation with dots, lines, bezier curves

#3 Post by Imperf3kt »

Note that ATL in large amounts like you plan to use, is resource heavy and may begin to slow your game down unless you have a really beefy computer.

You may be better off using a movie background.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
rururubell
Newbie
Posts: 13
Joined: Mon Sep 30, 2019 4:00 am
Deviantart: rururubell
Contact:

Re: Animation with dots, lines, bezier curves

#4 Post by rururubell »

names44, Thanks for the link! But, maybe there exists more suitable examples? About lines, and how to change lines coordinates and animate them?

Imperf3kt, first, I try to use mp4 and webm backgrounds. But it not works well (a lot of artifacts). And video backgrounds use a lot of cpu (80 - 90%) when vlc use only 5-10% with same video. One of my animated background with ATL, use only 10 - 20 % of cpy. And it has a ~20 FullHD layers.

My computer has an old Core2Duo CPU and 3Gb RAM.
Sorry for my English!

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Animation with dots, lines, bezier curves

#5 Post by isobellesophia »

You dont need to make your movie that complex, or maybe you could low the quality of the movie, just make it more easy and simple.
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Animation with dots, lines, bezier curves

#6 Post by Imperf3kt »

MP4 (also known as MPEG-4 part 10) is not supported.
https://www.renpy.org/doc/html/movie.html
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

rames44
Veteran
Posts: 233
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: Animation with dots, lines, bezier curves

#7 Post by rames44 »

rururubell wrote: Tue Oct 01, 2019 4:08 am names44, Thanks for the link! But, maybe there exists more suitable examples? About lines, and how to change lines coordinates and animate them?
It’s kind of hard to do “generic” examples with CDD’s, since most uses of them are highly specific to what you’re trying to do. Part of the power of them, however, is that you can get down to the underlying Canvas or Surface object, which then lets you use low-level Pygame drawing primitives. I think that’s what you’d have to do to draw beziers. Unfortunately, as I said, this would be rather Python-heavy, and probably not for the faint of heart.

Doing things like moving clouds and airplanes around would be simpler - you’d just be working with Renders and positioning them. But it’s possible that ATL might be just as good for that.

Note that I’m not a CDD expert - I’ve primarily used them to make custom transitions.

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Animation with dots, lines, bezier curves

#8 Post by Per K Grok »

rururubell wrote: Mon Sep 30, 2019 11:28 am
---

But how can I made mowing wires, shaked by wind?
---
The simplest way is to make a repeating animated image and show at the point of the screen where you need the moving wires.

Code: Select all

image wires:
    "wire1.png"
    0.2
    "wire2.png"
    0.2
    "wire3.png"
    0.2
    "wire4.png"
    0.2
    "wire5.png"
    0.2
    "wire6.png"
    0.2
    repeat


----------------------
----------------------


show wires:
    pos(600,50)


User avatar
rururubell
Newbie
Posts: 13
Joined: Mon Sep 30, 2019 4:00 am
Deviantart: rururubell
Contact:

Re: Animation with dots, lines, bezier curves

#9 Post by rururubell »

Ok guys. I think about this, and I just draw wires as bunch of semitransparent png's. As Per K Grok said. Of course, now my wires shakes with one frequency. But I think, that won't look too bad. Maybe, i do it with my planes too. Or change planes into flat lines png images, and just move his, like clouds.

Thanks for your answers!
Sorry for my English!

philat
Eileen-Class Veteran
Posts: 1912
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Animation with dots, lines, bezier curves

#10 Post by philat »

I've never really tried this (never had a need) but I remember thinking it looked interesting. Maybe take a look and see if it's what you need.

viewtopic.php?f=51&t=53397&p=503020

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]