SpriteManager and Particle Systems

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
Twoflower
Regular
Posts: 41
Joined: Sat Feb 25, 2017 11:53 am
Completed: Arcade Spirits
Projects: Arcade Spirits
Organization: Fiction Factory Games
Tumblr: fictionfactorygames
Contact:

SpriteManager and Particle Systems

#1 Post by Twoflower »

I'm trying to make a fairly generic sprite emitter, for things like falling dust, smoke, flames, etc...

Problem is I'm not really much of a python coder, so best I've managed is a hackjob version of SnowBlossom, which lets me constrain the starting XPos of the particles so they aren't the full width of the screen. See here. https://pastebin.com/njSN2D6s

It's super not great because I can't seem to change the anchor point of the individual sprites, making them scale or rotate around the upper left corner only, and it's not suitable for other types of particles. It's a hack at best and I could really use something better...

Does anyone have a good, generic ParticleBurst style function that's valid for 2018 games? I've searched the forums and only found old code from before SpriteManager came into being. I'd prefer a modern solution.

Thanks!
Image

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: SpriteManager and Particle Systems

#2 Post by Donmai »

I remember xela made some experiments using ATL and user-defined displayables:
viewtopic.php?f=8&t=36127
viewtopic.php?f=8&t=36451
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
Twoflower
Regular
Posts: 41
Joined: Sat Feb 25, 2017 11:53 am
Completed: Arcade Spirits
Projects: Arcade Spirits
Organization: Fiction Factory Games
Tumblr: fictionfactorygames
Contact:

Re: SpriteManager and Particle Systems

#3 Post by Twoflower »

I've tried that script -- can't quite get the right parameters to make a convincing flame or dust falling, although a single point of chaos looks fine. Hoping for something a bit more documented or flexible, I'm not knowledgable enough about python to make that one do everything.

Any ideas about the anchor problem? My modified snowfall would generally work okay if not for the inability to set the anchor point for transforms. It's stuck at 0,0.
Image

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]