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

Moderator: GZDoom Developers

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

Postby Edward-san » Wed Jan 20, 2016 11:31 am

This must be updated with the new acs functions and the new actor position code, because it won't merge/compile right now:

Code: Select allExpand view
/home/edward-san/zdoom/trunk/src/thingdef/thingdef_codeptr.cpp:2661:32: error:
      no member named 'x' in 'AActor'
                P_SpawnParticle(xoff + self->x, yoff + self->y, zoff + s...
                                       ~~~~  ^
/home/edward-san/zdoom/trunk/src/thingdef/thingdef_codeptr.cpp:2661:48: error:
      no member named 'y' in 'AActor'
                P_SpawnParticle(xoff + self->x, yoff + self->y, zoff + s...
                                                       ~~~~  ^
/home/edward-san/zdoom/trunk/src/thingdef/thingdef_codeptr.cpp:2661:64: error:
      no member named 'z' in 'AActor'
  ...P_SpawnParticle(xoff + self->x, yoff + self->y, zoff + self->z, xvel, yv...
                                                            ~~~~  ^
3 errors generated.
Edward-san
Mathematics is the language with which God has written the universe. (Galilei)
 
Joined: 17 Oct 2009

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

Postby Major Cooke » Thu Jan 21, 2016 9:44 am

I could fix it for edward850 if he's busy.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

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

Postby Graf Zahl » Thu Jan 21, 2016 9:52 am

No need to. That self->Vec3Offset(xoff, yoff, zoff) and then passing the 3 components to the function is a one minute issue.

But since my last post everybody still seems to weasel around a decision. So what's up? I think of all the pending submissions this is one of the most useful and least invasive ones so it's a prime candidate for immediate inclusion.
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 Major Cooke » Thu Jan 21, 2016 9:54 am

I say it's fine as it is. Edward decided to keep it as it is too.

edward850 wrote: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
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

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

Postby Graf Zahl » Thu Jan 21, 2016 10:01 am

Agreed.
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 StrikerMan780 » Thu Jan 21, 2016 11:28 am

A_SpawnParticles(count, minx, miny, minz, maxx, maxy, maxz, minvelx, minvely, minvelz, maxvelx, maxvely, maxvelz, color, lifetime, fullbright, startalpha, size, fadestep, accelx, accely, accelz)

Makes the number of parameters pretty large, but this is what I propose for spawning multiple particles. Being able to specify min/max offsets and velocities. (If someone already mentioned this, I apologize. In a hurry at the moment.)
User avatar
StrikerMan780
Struggling but getting by. For now.
 
Joined: 29 Nov 2005
Discord: StrikerTheHedgefox#6299
Github ID: StrikerMan780
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Gez » Thu Jan 21, 2016 11:33 am

IMO the color (or type) should be first, the count second, and all the other params should have workable default. Putting color, as you do, as the 14th parameter is not good.
Gez
 
 
 
Joined: 06 Jul 2007

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

Postby D2JK » Thu Jan 21, 2016 12:08 pm

minx, miny, minz, maxx, maxy, maxz, minvelx, minvely, minvelz, maxvelx, maxvely, maxvelz

I think there is no need for separate min/max parameters; frandom() should suffice here.

Other than that, I agree with having more options.
D2JK
 
Joined: 30 Aug 2014

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

Postby Graf Zahl » Thu Jan 21, 2016 12:18 pm

D2JK wrote:
minx, miny, minz, maxx, maxy, maxz, minvelx, minvely, minvelz, maxvelx, maxvely, maxvelz

I think there is no need for separate min/max parameters; frandom() should suffice here.



No, it wouldn't. You do not want one random number for all, you want different numbers, and for those you need the min and max.
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 Graf Zahl » Thu Jan 21, 2016 12:34 pm

Looking through this, I think I'm going to change the alpha parameter of the DECORATE version from byte to float for consistency. So please no hurry with the docs... ;)
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 Hellser » Thu Jan 21, 2016 12:39 pm

I can't wait to use this. Oh, this is going to be so deliciously good!
User avatar
Hellser
Remember Citadel
Global Moderator
 
Joined: 25 Jun 2006
Location: Citadel Station
Discord: Hellser#8156
Operating System: Windows 11
OS Test Version: Yes (Using Development/Testing Version)
Graphics Processor: ATI/AMD with Vulkan Support

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

Postby Major Cooke » Thu Jan 21, 2016 12:46 pm

Graf Zahl wrote:Looking through this, I think I'm going to change the alpha parameter of the DECORATE version from byte to float for consistency. So please no hurry with the docs... ;)

What about a relative flag? Something to make it like A_SpawnItemEx's relativity, or akin to A_ChangeVelocity's RELATIVE flag.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

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

Postby D2JK » Thu Jan 21, 2016 1:00 pm

No, it wouldn't. You do not want one random number for all, you want different numbers, and for those you need the min and max.

Your comment was a bit hard to decipher at first, but I assume you are referring to each random value being randomized only once per function call. If so, I see what you mean.
D2JK
 
Joined: 30 Aug 2014

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

Postby edward850 » Thu Jan 21, 2016 4:15 pm

Graf Zahl wrote:Looking through this, I think I'm going to change the alpha parameter of the DECORATE version from byte to float for consistency. So please no hurry with the docs... ;)

You didn't want to do this with fadestep as well, which directly relates to the starting alpha?
User avatar
edward850
[netcode intensifies]
 
Joined: 19 Jul 2005
Location: New Zealand

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

Postby Graf Zahl » Thu Jan 21, 2016 4:44 pm

Does it? Can you explain what this parameter is there for?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

PreviousNext

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests