[ACS + Decorate] Atan's Tracer System

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!
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

[ACS + Decorate] Atan's Tracer System

Post by Arctangent »

Something I've been wanting to try is making a tracer system that works with hitscans, and, well ...





I think I've succeeded.

Most of the system is ACS which is then called in Decorate, preferable by ACS_NamedExecuteWithResult because it can handle a fourth script parameter. The most basic usage can be done by adding the ACS and the BulletTracer actor directly to your project, then copying the modifications to the BulletPuff actor into the BulletPuffs you're using. More advanced use has brief documentation in the ACS source.

Download here.

Anyone's free to use this, just give credit to me somewhere.

Edit: Just realized a quick oversight meant that offsets were relative to the world, not to the firer's angle. While this could be worked around, I decided to fix this because it was kind of silly.
User avatar
Nash
 
 
Posts: 17450
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: [ACS + Decorate] Atan's Tracer System

Post by Nash »

Wow, that's a good-looking tracer effect!
User avatar
Slax
... in rememberance ...
Posts: 2121
Joined: Tue Oct 19, 2010 7:01 am
Location: Window office.

Re: [ACS + Decorate] Atan's Tracer System

Post by Slax »

May wanna speed up the rate at which that stuff disappears. No more lasers.
Also, keep it invisible for a while after firing so it won't look like you're spewing said lasers out of your gut.
User avatar
scroton
Posts: 148
Joined: Sat Apr 27, 2013 10:53 am

Re: [ACS + Decorate] Atan's Tracer System

Post by scroton »

Slax wrote:Also, keep it invisible for a while after firing so it won't look like you're spewing said lasers out of your gut.
You can use a dummy actor spawned with a_spawnitemex and an executewithresult script that returns the tid of the dummy actor and sets it to the player's/actor's user var and use the position of the dummy actor as the origin of the effect. You could also just calculate the offsets in the script itself.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: [ACS + Decorate] Atan's Tracer System

Post by Arctangent »

Slax wrote:May wanna speed up the rate at which that stuff disappears. No more lasers.
Also, keep it invisible for a while after firing so it won't look like you're spewing said lasers out of your gut.
That's all just for demonstration purposes; this system is pretty easy to modify ( it has infrastructure to support multiple tracer types, too ,so you could use it for a laser and still have bullet tracers ) so that the tracers appear and move to your liking.
User avatar
Sinael
Posts: 244
Joined: Tue Oct 18, 2011 8:57 am

Re: [ACS + Decorate] Atan's Tracer System

Post by Sinael »

I think something like that (if not exactly that) was used in Dakka, except Dakka did it better IMO.
User avatar
RikohZX
Posts: 307
Joined: Tue Sep 04, 2012 9:11 pm

Re: [ACS + Decorate] Atan's Tracer System

Post by RikohZX »

It does seem like standing in something like the Underhalls water causes the tracers to come from your face rather than your body due to the hitbox wonkiness involved with all that. Definitely an interesting means of seeing hitscan patterns at work otherwise, though.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: [ACS + Decorate] Atan's Tracer System

Post by Arctangent »

RikohZX wrote:It does seem like standing in something like the Underhalls water causes the tracers to come from your face rather than your body due to the hitbox wonkiness involved with all that. Definitely an interesting means of seeing hitscan patterns at work otherwise, though.
I'm going to guess this is because fake 3D liquids don't affect the height of the player, just their view height. At least, that's the only reason I can think of causing that, considered by the default Doom flats are as solid as any other regardless of if they're animated or not.

Still, if you give the player's weapons a unique bullet puff, you can expand the include "Get Target Property" script to add an option to get the view height instead, then use that in the player's bullet puff's tracer call. The usage of the actor's height for a z-offset is not hard coded at all.
User avatar
WARCHILD_89
Posts: 452
Joined: Sun Nov 17, 2013 12:27 pm
Graphics Processor: nVidia with Vulkan support
Location: MIA between doomed dimensions

Re: [ACS + Decorate] Atan's Tracer System

Post by WARCHILD_89 »

I used the tracer in Particle fire enhancer and recoded it to be fired as missile, so I do not have any Hitscans in any weapon of my mod AND I can define Damage and damage type by defining a new tracer inheriting from the basic one. The next step would be to add a 3d model to it. The tracer does also work with "Ketchuptest.pk3" (brutal doom style blood)


So you get nice looking tracers which have the hitscan particle effects when hitting a wall. Honestly I haven´t seen anything better yet, but your version is well for people who do NOT use the particle fire enhancer.


NOTE: What exactly were you trying to do? I did not get why ACS is used.....
Last edited by WARCHILD_89 on Wed May 13, 2015 6:58 am, edited 2 times in total.
User avatar
TheBadHustlex
Posts: 1914
Joined: Thu Oct 03, 2013 12:50 am
Location: 'stria

Re: [ACS + Decorate] Atan's Tracer System

Post by TheBadHustlex »

I'd make 'em a little thinner, they look like lasers right now. But otherwise not bad.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: [ACS + Decorate] Atan's Tracer System

Post by Arctangent »

WARCHILD_89 wrote:NOTE: What exactly were you trying to do? I did not get why ACS is used.....
Basically, you execute the included script via a hitscan's bullet puff, then it'll draw a line of particles from the firer's location to the puff's. It's a bit more complicated than that, however, as the line "travels" over time, choosing the faster of a set speed or a duration ( so that long-range hitscans don't have the tracer hit five seconds after the bullet puff's already gone, while keeping the tracer from going too slow if the distance it has to travel isn't that long ).
TheBadHustlex wrote:I'd make 'em a little thinner, they look like lasers right now. But otherwise not bad.
Ideally, someone using these would define their own tracers that fit the weapons. There's documentation on how to do this in the source.

One of the things I made with messing with these was actually a laser, so y'know.
User avatar
WARCHILD_89
Posts: 452
Joined: Sun Nov 17, 2013 12:27 pm
Graphics Processor: nVidia with Vulkan support
Location: MIA between doomed dimensions

Re: [ACS + Decorate] Atan's Tracer System

Post by WARCHILD_89 »

ok you seem to want to get some specific effect. Maybe it´s not cpu usage intensive?

My weapon tracers just work like missiles with different speeds, damage values and damage types. So when I fire e.g. my shotgun, it fires a bunch of tracers, spawning blood when hitting bleeding actors, junk when hitting eg an enemy tank with +NOBLOOD flag set and sparks when hitting a wall. I have no Puff types at all.

I remember my old laptop could not handle this and my fps got down.
User avatar
Thfpjct
Posts: 15
Joined: Thu Jul 18, 2019 9:36 pm
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [ACS + Decorate] Atan's Tracer System

Post by Thfpjct »

There is some way to change the tracer position?
like, from where on screen it comes out?

Return to “Resources”