Page 1 of 1

ZScript Particle-Based Tracers

PostPosted: Thu Jun 08, 2017 3: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

PostPosted: Thu Jun 08, 2017 9: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

PostPosted: Thu Jun 08, 2017 9: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

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

Re: ZScript Particle-Based Tracers

PostPosted: Fri Jun 16, 2017 2: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

PostPosted: Thu Jul 06, 2017 3:04 pm
by NeonLights95
Really nice.

Re: ZScript Particle-Based Tracers

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

Re: ZScript Particle-Based Tracers

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

Re: ZScript Particle-Based Tracers

PostPosted: Fri Jul 13, 2018 2: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

PostPosted: Fri Jul 13, 2018 8: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

PostPosted: Fri Jul 13, 2018 11: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().