Page 1 of 1

ZScript Particle-Based Tracers

Posted: Thu Jun 08, 2017 2:51 pm
by DenisBelmondo
Spoiler: Screenies
Before I go on, I gotta come clean. I am not completely sure if the code is completely sanitised and commented to be optimally helpful but I felt bad making people wait so I decided to just release it because making comprehensive documentation is a project in itself but I'm sure you fellas are smart enough to figure out how this works. The bullet class actually lerps between its previous coordinates and its current coordinates and draws a trail of particles in between with their individual sizes being proportional to its end position, meaning it makes a little tail at the end instead of being a long brick of particles. Though, this particular implementation is not without its caveats. The faster the bullet goes, the longer the trail is going to be because of the larger difference between xyzprevious and xyz.

If you wish, you can replace the particles with classes whose sprites are PUFFA0 but I figured out that it really chokes your PC, especially when additively rendered so if you use this in a project I advise you use the particles as opposed to actors. I also hope you don't mind crediting me. Thanx a bunch and have a ball.

Download link

Re: ZScript Particle-Based Tracers

Posted: Thu Jun 08, 2017 8:16 pm
by Nash
Very cool but I imagine it won't look the same if the user sets their particle preference to round or smoothed. :D Still, good work!

Re: ZScript Particle-Based Tracers

Posted: Thu Jun 08, 2017 8:44 pm
by DenisBelmondo
Yeah an unfortunate drawback of the particle based tracers... if there was a SPF_FORCESQUARE I would definitely flip it on since the round and smooth styles don't look quite right in my opinion. Anyway, thanks so much!

Re: ZScript Particle-Based Tracers

Posted: Thu Jun 15, 2017 3:35 pm
by Matt
Round version of this... now I want Bokeh Doom. Brütal Bökeh Doom.

Re: ZScript Particle-Based Tracers

Posted: Fri Jun 16, 2017 1:48 am
by tsukiyomaru0
I actually think round looks better than squared. Otherwise, I really like this coding, it is actually very simple.

Re: ZScript Particle-Based Tracers

Posted: Thu Jul 06, 2017 2:04 pm
by AlphaSoraKun
Really nice.

Re: ZScript Particle-Based Tracers

Posted: Tue Jul 11, 2017 4:51 am
by vólentiæn
well done... these look amazing

Re: ZScript Particle-Based Tracers

Posted: Sun Jul 30, 2017 6:02 pm
by Xeotroid
With particles set to smooth and bloom enabled, this looks particularly great!

Re: ZScript Particle-Based Tracers

Posted: Fri Jul 13, 2018 1:50 pm
by dodopod
Would you mind if I incorporated this into my weapons library? I was trying to implement my own tracers, but these look much better.

edit: I've gotten into a tinkering mood, so it'll probably be pretty heavily modified. That probably doesn't matter, but some people really hate it when others touch their work.

Re: ZScript Particle-Based Tracers

Posted: Fri Jul 13, 2018 7:44 pm
by Reactor
Superb work, DenisBelmondo, you surely did a marvelous job! I was wondering, can it be tweaked some more, so it could be used for energy weapon shots? Like a Quake 3-style rail beam-like tracer for weapons like the Prism rifle.

Re: ZScript Particle-Based Tracers

Posted: Fri Jul 13, 2018 10:31 pm
by DenisBelmondo
Thanks a bunch you guys.

@dodopod Yeah go right ahead! So long as you provide credit and leave my little comments in the scripts.

@Reactor You should be able to make an energy weapon if you "override" the color table with values that represent various shades of energy blue or red. A more true-to-Q3 railgun iirc can be achieved if you set the particle spread and speed to 0 in a_railattack().

Re: ZScript Particle-Based Tracers

Posted: Wed Oct 06, 2021 3:02 pm
by DenisBelmondo
hey all, sorry for the bump. apparently google drive updated something about their security protocol bla bla bla and rendered all old drive links invalid. updated the first post with "The Good Link".

P.S. this mod was made before i knew anything about proper object oriented design. i should overhaul this with a Version 2 Rewrite, so look out for that.

Re: ZScript Particle-Based Tracers

Posted: Thu Oct 07, 2021 11:57 am
by Redneckerz
DenisBelmondo wrote:hey all, sorry for the bump. apparently google drive updated something about their security protocol bla bla bla and rendered all old drive links invalid. updated the first post with "The Good Link".

P.S. this mod was made before i knew anything about proper object oriented design. i should overhaul this with a Version 2 Rewrite, so look out for that.
Great stuff man :) I am not sure how much it adds, but maybe this could be in official GZDoom as an option?

Re: ZScript Particle-Based Tracers

Posted: Fri Aug 05, 2022 3:25 am
by ramon.dexter
Yes, thank you for this great stuff man :D