Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Particles disappear incorrectly

Author
Message
greenlig
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 9th Jan 2012 07:12
Hi guys,

I'm not sure whether what I am doing is wrong, or there is something not quite right happening with particles.

When I run this code, the particles fade in like they should, but I am expecting, because of the life variable of 120, that they will last for quite some time. Instead, they are "popping" out of existence after roughly 15-20 seconds of life.

You can just copy-pasta this code and it will run in AGK.



Am I doing something wrong here? I have toyed with the properties of the particle system quite a bit, and can't find a solution. I created a new particle system and discovered the same problem. It seems to not like lifespans longer than that 15-20 second mark.

Any ideas? Help will be rewarded with much love and good will!

Cheers,
Greenlig

Your signature has been erased by a mod as it is far too big.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 9th Jan 2012 08:18
It looks like a life of 20 is the limit. Add this to your loop:

Print(GetParticlesLife(3))

For me it prints 20.0 even though you have clearly set it to 120. It might be worth posting as a bug.

greenlig
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 9th Jan 2012 08:46 Edited at: 9th Jan 2012 08:59
Nice, didn't even notice the GetParticlesLife() command.

Thanks for the reply, Hodgey.

Regards,
Greenlig

EDIT: Submitted report - http://code.google.com/p/agk/issues/detail?id=222

Your signature has been erased by a mod as it is far too big.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Jan 2012 10:35
Yes, 120 seconds seems a long time though... are you sure you need that much?

I agree it needs fixing but that seems excessive.

BTW I love this typo "copy-pasta", made me smile almost as much as your avatar

greenlig
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 9th Jan 2012 12:18
Yeah, I put the value of 120 in originally as I was not seeing the results that I expected. I guess any number over 20 will exhibit this error. Basically, slowly drifting clouds need a lot of time, man!

Greenlig

Your signature has been erased by a mod as it is far too big.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Jan 2012 12:26
I find the particle commands very limited. I've actually started my own set of particle commands that include physics based smoke it works really well (example attached, moving the mouse through the smoke shows the physics system in action but I'm still ironing out the bugs). You can have a LOT more control if you make your own system.

Attachments

Login to view attachments
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th Jan 2012 12:30
Nice particle system Baxslash.

I wish the AppGameKit particle system was more flexible. Basically if they can allow resizing of particles over time, it would already make it much more usable, but this seems to be a problem with the point sprites they use.
greenlig
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 9th Jan 2012 12:35 Edited at: 9th Jan 2012 12:38
@ Backslash - After playing round with it a bit, I have found it slightly limited to. I was hoping for simple gravity and physics ala Flixel.

Nice example you have there. I would like to do something like this, but I am not up to tackling a particle system yet. I think I could do it, but the time it would take for me barely offsets the limits of the vanilla system.

You reckon you'll release your library when it's done?

Greenlig

Edit - Also, I'd love to be able to set sprites to a particle system, or something similar to the SetParticlesColorKeyFrame(), only for images. Basically, to make a flock of birds, create an emitter, set up the particles, and get them to randomly loop through two bird flap frames. Would be much simpler than setting up a heap of sprites.

Your signature has been erased by a mod as it is far too big.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Jan 2012 12:35
Yes, resizing is a huge thing for particles but even allowing that isn't enough sometimes, the flames in my example are resizing in one direction only and being manually moved based on their offset which is not central. Not many particle systems give that much control.

I'll share my whole system once it's done. I also have a water system on the way too but this is just a side effect of my current main project

Login to post a reply

Server time is: 2024-11-23 00:41:27
Your offset time is: 2024-11-23 00:41:27