Particle Animation for Insects

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
Morhighan
Miko-Class Veteran
Posts: 975
Joined: Sun Jun 27, 2010 12:54 pm
Completed: AIdol, When Our Journey Ends, Forgotten Not Lost
Organization: MysteryCorgi
Tumblr: MysteryCorgi
Deviantart: MysteryCorgi
Soundcloud: MysteryCorgi
itch: MysteryCorgi
Location: USA
Contact:

Particle Animation for Insects

#1 Post by Morhighan »

I've been using this More Realistic Snow effect for snow. Now I want to make a particle effect that is like bugs floating around. So far the documentation has helped a lot I just need one last problem solved.

My main problem right now is that the "speed" variable makes the particles only go towards the ground. There is also the "wind" variable, which changes the direction. I just kind of want the particles to float around the screen. I'm not sure how to do this. I'm considering making a "xspeed" and "yspeed" variables but I'm not sure that will work.

I'm using the Snow effect for a base since I'm not able to "imagine" the programming on my own.

Any pointers would be great!'

EDIT:
So I like Donmai's suggestion, but I want to change it up a bit. I want the bugs to blink and kind of wander around the screen. You know, to be more insect-like.

Donmai suggested this code:

Code: Select all

transform withAdd:
        additive 1.0

image particle newDownBright = SnowBlossom(At("images/blue-particle-circle.png", withAdd), border=150, count=6000,start=0.00000000001, fast=False, yspeed=(-100, -80), xspeed=(-3000,3000), horizontal=True)
And I am also trying with the More Realistic Snow and I'm just scratching my head as how to get the particles to blink (two images maybe?) as well as the "wander" motion.
Last edited by Morhighan on Sun Aug 28, 2016 7:50 pm, edited 3 times in total.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Particle Animation

#2 Post by Donmai »

I believe this will do what you want:
viewtopic.php?f=51&t=24762
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
Morhighan
Miko-Class Veteran
Posts: 975
Joined: Sun Jun 27, 2010 12:54 pm
Completed: AIdol, When Our Journey Ends, Forgotten Not Lost
Organization: MysteryCorgi
Tumblr: MysteryCorgi
Deviantart: MysteryCorgi
Soundcloud: MysteryCorgi
itch: MysteryCorgi
Location: USA
Contact:

Re: Particle Animation

#3 Post by Morhighan »

Donmai wrote:I believe this will do what you want:
viewtopic.php?f=51&t=24762
Ah-ha! I think so! Thank you Donmai. :)

User avatar
Morhighan
Miko-Class Veteran
Posts: 975
Joined: Sun Jun 27, 2010 12:54 pm
Completed: AIdol, When Our Journey Ends, Forgotten Not Lost
Organization: MysteryCorgi
Tumblr: MysteryCorgi
Deviantart: MysteryCorgi
Soundcloud: MysteryCorgi
itch: MysteryCorgi
Location: USA
Contact:

Re: Particle Animation for Insects

#4 Post by Morhighan »

So I like Donmai's suggestion, but I want to change it up a bit. I want the bugs to blink and kind of wander around the screen. You know, to be more insect-like.

Donmai suggested this code:

Code: Select all

transform withAdd:
        additive 1.0

image particle newDownBright = SnowBlossom(At("images/blue-particle-circle.png", withAdd), border=150, count=6000,start=0.00000000001, fast=False, yspeed=(-100, -80), xspeed=(-3000,3000), horizontal=True)
And I am also trying with the More Realistic Snow and I'm just scratching my head as how to get the particles to blink (two images maybe?) as well as the "wander" motion.

User avatar
papiersam
Veteran
Posts: 231
Joined: Fri Aug 12, 2016 2:24 pm
Completed: Gem Hunt Beta, 1/Probably, Animunch
Projects: The Panda Who Dreamed
Contact:

Re: Particle Animation for Insects

#5 Post by papiersam »

You could add another image to make it blink:

Code: Select all

transform withAdd:
        additive 1.0

image particle newDownBright = SnowBlossom(At(Animation("images/blue-particle-circle.png", 0.15, "images/blank.png, 0.05),withAdd), border=150, count=6000,start=0.00000000001, fast=False, yspeed=(-100, -80), xspeed=(-3000,3000), horizontal=True)
Or use ATL sort of like:

Code: Select all

rv.append(At(image,blink_atl(p)))

Alvsvartr
Newbie
Posts: 21
Joined: Wed Aug 17, 2016 9:31 am
Soundcloud: nebelwand-ua
Location: Ukraine
Contact:

Re: Particle Animation for Insects

#6 Post by Alvsvartr »

Would you be so kind to explain how to add this one into script correctly :?:

User avatar
Andredron
Miko-Class Veteran
Posts: 719
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: Particle Animation for Insects

#7 Post by Andredron »

Code: Select all

transform withAdd:
        additive 1.0
transform withAdd2:
        additive 1.0
        Alfa 1.0
        linear 2.0 Alfa 0.2
        repeat


image particle newDownBright = SnowBlossom(At(Animation("images/blue-particle-circle.png", 0.15, "images/blank.png, 0.05),withAdd), border=150, count=6000,start=0.00000000001, fast=False, yspeed=(-100, -80), xspeed=(-3000,3000), horizontal=True)

label start:

show particle newDownBright at withAdd

show particle newDownBright at withAdd2

Alvsvartr
Newbie
Posts: 21
Joined: Wed Aug 17, 2016 9:31 am
Soundcloud: nebelwand-ua
Location: Ukraine
Contact:

Re: Particle Animation for Insects

#8 Post by Alvsvartr »

Andredron wrote: Sat Jan 19, 2019 4:06 am

Code: Select all

transform withAdd:
        additive 1.0
transform withAdd2:
        additive 1.0
        Alfa 1.0
        linear 2.0 Alfa 0.2
        repeat


image particle newDownBright = SnowBlossom(At(Animation("images/blue-particle-circle.png", 0.15, "images/blank.png, 0.05),withAdd), border=150, count=6000,start=0.00000000001, fast=False, yspeed=(-100, -80), xspeed=(-3000,3000), horizontal=True)

label start:

show particle newDownBright at withAdd

show particle newDownBright at withAdd2
There is a mistake in "images/blank.png - lack of ". But even with it this code doesn't want to work.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], snotwurm