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.

2D All the way! / Query about Particles

Author
Message
Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 12th Sep 2020 20:04 Edited at: 8th Oct 2020 01:52
Hello!

I've been experimenting with the AppGameKit particles system and it work remarkably well.

Using the particle system does give the required effect, the only draw back being there is no control over the emitted particles.

Could anyone suggest a similar particle system with a little more fucntionality?

For example, when a particle reaches a "y_pos" it's killed off or triggers an event?

Thanks in advance!

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 13th Sep 2020 07:56 Edited at: 13th Sep 2020 08:00
i'm struggling to understand the pic (which looks nice, btw) and what, within the pic, you want to control or cause a trigger, etc.

since you have the emitter start location and are adding, theoretically, the direction, etc, you should be able to do some calculations to determine when a given particle reaches a particular location. within reason, that is, and depending on what you might be doing to the particles once they've been spit out.

otherwise, doing those kinds of checks, calculations, etc, would probably undermine the point of the particle system in the first place (which strips away a lot of that to increase performance), as i understand it, leaving you to write your own (which shouldn't be too difficult).

meanwhile, if you have some basic code you can share (because i honestly don't know what, in the pic, i should be focusing on), and exactly what you want to happen when (IE, the effect you're trying to achieve), i'm sure a solution can be found. or, a short vid and what to watch for, might help, too.
[My Itch.io Home] [#LowRezJamAGK2020]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=AGK] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[Google Forum Search]
Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 13th Sep 2020 13:29
Thanks for the reply..

Everything you say is correct.

At present I can calculate the life required from emitter x,y to the end point on the particle trajectory.. ( ie, the centre of a slot x, y )

From this I could then adjust the life time of the particle so it doesn't travel higher than the slot y_pos.

But as much as you can say.. life is 0.8 seconds .. just thought it would be good if you could apply boundary positions to the particles.

Obviously adding position checks to each particle will have a performance hit - well aware of that.

For now - I can tinker about the z ordering of certain parts of the background ( eg. create masks ) so the particles only show where I want them.

When time allows I think I'll write my own sprite based particle / system.

Login to post a reply

Server time is: 2024-04-25 05:57:30
Your offset time is: 2024-04-25 05:57:30