[Added] A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Moderator: GZDoom Developers

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby Blzut3 » Wed Dec 09, 2015 9:20 am

That's a "lets discuss this a little bit first." I don't really have a problem with the proposed function outside of your concern that calling it 30 times or whatever to create a splash effect might defeat the purpose a little (at least on the DECORATE side, on the ACS side it doesn't seem as crazy), so would like to have a little discussion on a splash function at least.
Blzut3
Pronounced: B-l-zut
 
 
 
Joined: 24 Nov 2004
Github ID: Blzut3
Operating System: Debian-like Linux (Debian, Ubuntu, Kali, Mint, etc) 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby Gez » Wed Dec 09, 2015 9:34 am

It'd be better if the function spawned a number of particles at once, yes.
A_SpawnParticles(color, number, other parameters)

If you'll let me bikeshed the order for the parameters, I think the most important one should be first, and the most likely to be kept at useful defaults be last. The xyz spawning offsets, for example, could very well stay 0 in most cases, so they can be shuffled at the end of the function call; whereas the particle color (or type, if you go to the length of creating a derivable particle class) ought to be the first parameter.
Gez
 
 
 
Joined: 06 Jul 2007

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby Xaser » Wed Dec 09, 2015 1:00 pm

A "number" field indeed ought to cover the general use case of 'splosions since all you need to do is frandom the direction they travel and it's good to go. Anything else beyond that is likely to fall into the "special case" category.

I'm surprisingly pumped about this being a thing for some reason.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby Major Cooke » Wed Dec 09, 2015 2:22 pm

I know one reason I'd like this function, because it supports zdoom's limitation of particles. :P
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby edward850 » Wed Dec 09, 2015 4:11 pm

Gez wrote:It'd be better if the function spawned a number of particles at once, yes.
A_SpawnParticles(color, number, other parameters)

Xaser wrote:A "number" field indeed ought to cover the general use case of 'splosions since all you need to do is frandom the direction they travel and it's good to go.

There in lies the problem. Can such a thing be done without adding ~12 additional parameters in both decorate and ACS? Remember you can't just add a count, everything else needs to be ranged.

Edit: Actually I might have a simple solution to this. Watch this space.
User avatar
edward850
[netcode intensifies]
 
Joined: 19 Jul 2005
Location: New Zealand

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby Ravick » Wed Dec 23, 2015 10:02 pm

Just a quickly opinion about the amount of arguments, I rly don't think it is bad if they are many. More 'moddable' arguments means more flexibility, more 'modding power' for the modders to work with. In this case, I rly believe that "the more, the best".
User avatar
Ravick
Do what thou wilt, since you don't bug the hell out of me!
 
Joined: 22 Aug 2010
Location: Tubarão, Brasil

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby edward850 » Wed Dec 23, 2015 10:30 pm

Not if you have to multiply the present arguments by two. Keep in mind that whatever is available has to be translated into code. We equally don't want too much internally either.

Edit: I haven't forgotten about this, by the way, just that this request came unfortunately close to the Christmas holidays.
Last edited by edward850 on Thu Dec 24, 2015 3:10 pm, edited 1 time in total.
User avatar
edward850
[netcode intensifies]
 
Joined: 19 Jul 2005
Location: New Zealand

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby Eevee » Thu Dec 24, 2015 2:44 pm

This is an argument for named arguments in DECORATE/ACS if I've ever seen one.

Perhaps a good test of the interface would be to port the particle fountains to DECORATE?

This is amazing though, I love particles and have always been a bit sad that they're only available in hardcoded form :)
User avatar
Eevee
wow, i'm still here!
 
Joined: 16 Jul 2003

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby Hellser » Tue Jan 19, 2016 11:47 am

So uh. It's been close to a month. Any update, Edward? Spawning Particles would be so nifty, and great for many - many effects!
User avatar
Hellser
Remember Citadel
Global Moderator
 
Joined: 25 Jun 2006
Location: Citadel Station
Discord: Hellser#8156
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD with Vulkan Support

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby Graf Zahl » Tue Jan 19, 2016 1:20 pm

That's what happens if nobody wants to make a decision.

For the record, I have no fundamental issues with thr function as it is . It may be a bit unwieldy but I haven't come up with a better solution yet.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby Xaser » Tue Jan 19, 2016 3:33 pm

At present, one can do loops with uservars or repeat the state with a zero-delay (for random explosions), so yep, it's already better than nothing. ;)
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby edward850 » Tue Jan 19, 2016 3:35 pm

Still haven't forgotten about it, but I still need a proper idea for grouped spawning if we still want that (the one I had before didn't really solve anything). Otherwise the current method is still solid if nobody has any immediate problems with it.
User avatar
edward850
[netcode intensifies]
 
Joined: 19 Jul 2005
Location: New Zealand

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby Blzut3 » Tue Jan 19, 2016 7:22 pm

What was the idea you had before? You just kind of left it at "hang on, I got this."
Blzut3
Pronounced: B-l-zut
 
 
 
Joined: 24 Nov 2004
Github ID: Blzut3
Operating System: Debian-like Linux (Debian, Ubuntu, Kali, Mint, etc) 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby edward850 » Tue Jan 19, 2016 7:24 pm

It kind of melted over the Christmas holidays when I was stuck with my laptop. I was going to try and set everything up with variance variables but it quickly become too bloated as well (which seems to be the problem with most ideas), especially if you only wanted to spawn 1 particle at a time.
The way I see it at the moment, it shouldn't matter as is. As long as it's named A_SpawnParticle (which it is), if a good idea comes in the future, you still have room for a plural A_SpawnParticles. :P
User avatar
edward850
[netcode intensifies]
 
Joined: 19 Jul 2005
Location: New Zealand

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Postby Major Cooke » Tue Jan 19, 2016 9:17 pm

There is one more thing. Perhaps a flag for velocity setting similar to CVF_RELATIVE from A_ChangeVelocity? You could convert the bool in there to flags.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

PreviousNext

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest