A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
Moderator: GZDoom Developers
-
- Posts: 2037
- Joined: Sun Aug 22, 2010 10:59 pm
- Location: Tubarão, Brasil
A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
Something just like: 'A_SpawParticles (Xoffset,Yoffset,Zoffset,Xspeed,Yspeed,ZSpeed,Color)'
Just to make it more easy to use particles in making effects.
Well, just an idea.
Just to make it more easy to use particles in making effects.
Well, just an idea.
-
- Posts: 13549
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
Use A_SpawnItemEx
-
- Posts: 8197
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
I don't think he means actors, I think he means rail particles.
-
- Posts: 1914
- Joined: Thu Oct 03, 2013 12:50 am
- Location: 'stria
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
That would be awesome. Right now, all you can do is inherit from a particlefountain and change it's spawning-duration.
-
- Posts: 13549
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
Now that you say Sorry, I was a bit too quick here. Though, emulating their behaviour with an actor based variant would easily work with A_SpawnItemExMajor Cooke wrote:I don't think he means actors, I think he means rail particles.
-
-
- Posts: 17936
- Joined: Fri Jul 06, 2007 3:22 pm
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
Actor-based "particles" have a huge overhead compared to actual particles. On the plus side you can do much fancier effects with them.
-
- Posts: 2123
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
What would be nice is an special type of actor that doesn't inherit from Actor and is pretty much the same as the particles... Pretty much "just" exposing the internal particle actor to DECORATE if there's one.
Basically, it would be something like this:
Or like this: (Much better because this way you can use sprites)
Basically, it would be something like this:
Code: Select all
particle ExplosionParticle1 {
color Yellow
speed 8
fadeTime 5
stayTime 8
}
Code: Select all
particle ExplosionParticle1 {
speed 8
fadeTime 5
stayTime 8
states {
Spawn:
SPRK A 1
loop
}
}
-
- Posts: 8197
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
I think it's a matter of actually rendering, phantom. ZDoom creates the particles themselves whereas sprites are loaded, albeit I recall Randi saying something about hardly anything is put into the renderer...
-
-
- Posts: 17936
- Joined: Fri Jul 06, 2007 3:22 pm
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
And you're introducing the whole "actor state" logic, which means particles would have to have the same tick() routine that actors do, and you lose a large part of the benefit of reduced overhead...phantombeta wrote:Or like this: (Much better because this way you can use sprites)
-
- Posts: 2123
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
There would still be the advantage of never being checked for anything by other actors AFAIK.
Just a "sprite" property would be good enough for me.
Just a "sprite" property would be good enough for me.
-
- Posts: 5886
- Joined: Tue Jul 19, 2005 9:06 pm
- Location: New Zealand
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
Particles also use substantially less memory as they aren't an aactor or derived thinker, controllable by the end user for rendering and performance as they are inherently non-existent to the playsim, and have a special optimized rendering routine due to being a single pixel.
I have no idea why you want to over complicate this for everyone else.
I have no idea why you want to over complicate this for everyone else.
-
-
- Posts: 17936
- Joined: Fri Jul 06, 2007 3:22 pm
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
Really the entire point of particles is that they have minimum overhead. A sprite property could perhaps make sense in GZDoom's OpenGL renderer; but it'd have to be ignored by the software renderer.
-
- Posts: 545
- Joined: Sat Aug 30, 2014 8:21 am
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
What sort of things can you do with particles? Can you give them random X/Y/X velocities, subject them to (custom) gravity, have them bounce off surfaces, or emit lights (GzDoom)?
Just wondering.
Just wondering.
-
- Posts: 165
- Joined: Tue Nov 24, 2015 1:58 pm
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Inwood, WV
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
This' be another cool feature,especially because particle fountains and railgun particles are too limited!
@D2JK I'd assume all of those except the last two would be possible, no bouncing if they're "non-existent" to ZDoom and if each emitted a dynamic light, I could only imagine if there were a lot of them, there'd be lag.though it'd still look cool.
@D2JK I'd assume all of those except the last two would be possible, no bouncing if they're "non-existent" to ZDoom and if each emitted a dynamic light, I could only imagine if there were a lot of them, there'd be lag.though it'd still look cool.
-
- Posts: 2037
- Joined: Sun Aug 22, 2010 10:59 pm
- Location: Tubarão, Brasil
Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
As said, the point in using particles would rely on the less memory usage. The Wiki says we can have thousands of them on the screen at the same time. I can barely wonder what experienced modders would do with such power on their hands, even the particles itself being just single [edit] pixels with limited behavior control. Just being able to control initial speeds and color would, I guess, be an awesome feature to work with in making different kinds of effects.
edit#2: BTW, having an 'angle' parameter would also be good. (Assuming that particles can have it, of course).
edit#2: BTW, having an 'angle' parameter would also be good. (Assuming that particles can have it, of course).
Last edited by Ravick on Sat Dec 05, 2015 10:44 am, edited 1 time in total.