ZScript Particle-Based Tracers

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!

ZScript Particle-Based Tracers

Postby DenisBelmondo » Thu Jun 08, 2017 3:51 pm

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
Last edited by DenisBelmondo on Thu Jun 08, 2017 9:45 pm, edited 1 time in total.
User avatar
DenisBelmondo
now is time to the i386 heart on fire
 
Joined: 06 Jun 2008
Location: Two-Key Return

Re: ZScript Particle-Based Tracers

Postby Nash » Thu Jun 08, 2017 9:16 pm

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!
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: ZScript Particle-Based Tracers

Postby DenisBelmondo » Thu Jun 08, 2017 9:44 pm

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!
User avatar
DenisBelmondo
now is time to the i386 heart on fire
 
Joined: 06 Jun 2008
Location: Two-Key Return

Re: ZScript Particle-Based Tracers

Postby Matt » Thu Jun 15, 2017 4:35 pm

Round version of this... now I want Bokeh Doom. Brütal Bökeh Doom.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: ZScript Particle-Based Tracers

Postby tsukiyomaru0 » Fri Jun 16, 2017 2:48 am

I actually think round looks better than squared. Otherwise, I really like this coding, it is actually very simple.
User avatar
tsukiyomaru0
 
Joined: 29 May 2010

Re: ZScript Particle-Based Tracers

Postby NeonLights95 » Thu Jul 06, 2017 3:04 pm

Really nice.
User avatar
NeonLights95
 
Joined: 10 Feb 2017
Location: Michigan, USA

Re: ZScript Particle-Based Tracers

Postby vólentiæn » Tue Jul 11, 2017 5:51 am

well done... these look amazing
User avatar
vólentiæn
2 many poltergeists
 
Joined: 25 Mar 2016
Location: Düsseldorf, Germany
Discord: Reineke #6077

Re: ZScript Particle-Based Tracers

Postby Xeotroid » Sun Jul 30, 2017 7:02 pm

With particles set to smooth and bloom enabled, this looks particularly great!
User avatar
Xeotroid
 
Joined: 23 Jun 2012
Location: Czech Rep.

Re: ZScript Particle-Based Tracers

Postby dodopod » Fri Jul 13, 2018 2:50 pm

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.
dodopod
 
Joined: 04 Oct 2017

Re: ZScript Particle-Based Tracers

Postby Reactor » Fri Jul 13, 2018 8:44 pm

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.
User avatar
Reactor
The militarist
 
Joined: 03 Feb 2011
Location: Island's Beauty, Hungary

Re: ZScript Particle-Based Tracers

Postby DenisBelmondo » Fri Jul 13, 2018 11:31 pm

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().
User avatar
DenisBelmondo
now is time to the i386 heart on fire
 
Joined: 06 Jun 2008
Location: Two-Key Return


Return to Resources

Who is online

Users browsing this forum: Semrush [Bot], sinaptica and 3 guests