Page 1 of 1

rocket smoke trail

Posted: Sat Sep 26, 2020 9:38 am
by Steve5563
would it be possible to make a rocket smoke trail sprite configuration that consist of only using a few actors,
to make a large texture tiling smoke trail effect rather then lots of individual sprites?
when you fire a rocket, the rocket can spawn an anchor actor, the anchor actor is a reference point for the rocket on where to start drawing the texture to be tiled.
as the rocket moves further away from the anchor actor, the smoke texture continues to tile over distance in the horizontal direction ( z-axis i think)
the tiled smoke texture is locked in its (z-axis) so the actor cannot rotate around on the (y-axis) as the player circles around the effect,
but the tiled texture can roll over on its (z-axis) so it faces the player based on player height.
this would be a neat visual effect for long rocket smoke trails in big open levels while using less actors at the same time for the cpu to keep track of. (game optimization)

Re: rocket smoke trail

Posted: Sat Sep 26, 2020 10:18 am
by Graf Zahl
This has no place in the engine, it's something for a user mod.

Re: rocket smoke trail

Posted: Sat Sep 26, 2020 10:43 am
by Steve5563
ok, so where would be a good place to start to understand and learn on how to implement something like this into a mod for gzdoom?

Re: rocket smoke trail

Posted: Wed Sep 30, 2020 11:59 am
by Kappes Buur
Check out the Seekerbazooka from Realm667

Re: rocket smoke trail

Posted: Thu Oct 01, 2020 9:10 am
by Steve5563
Kappes Buur, i had a look at that rpg you mentioned and i noticed when you fire the rocket,
the rocket itself just spawns in the normal smoke actors you mostly see with rocket launchers in any game.
the feature i was asking for was,
when the rpg is fired a rocket is spawned and at the same time this rocket spawns a child actor, this child (anchor) actor is the place holder for the smoke texture to start from and is to be tiled over and over again based on distance to the rocket,
the appearance of this sprite is to be similar to a "flat sprite texture" except it can be setup to roll on its horizontal axis.
the child actor is for the engine to calculate the distance between the child actor and the rocket as it moves further away from the child actor.

the child actor will be the reference point for the smoke texture to start drawing from,
it's from this point the texture will be displayed and repeated or "tiled" over and over again as the rocket moves further away from the child actor,
just like the textures currently do on map geometry in doom ( textures are tiled vertically and horizontally).
im just asking for the smoke texture to be tiled horizontally to the rockets direction using a child actor to tell the engine where to start the texture tiling from.

this is somewhat like a tracer round i guess but instead we can use a smoke texture that keeps tiling forever and doesn't fade away only until the rocket goes into its death state which can have a line of code to destroy the child actor it spawned.
the death state for the child actor can fade the smoke texture away by lowering the alpha values overtime to zero, before the rocket actor is removed from the game.

the idea with this is to create a large rocket trail effect without having to stretch the one texture. like in this video https://www.youtube.com/watch?v=AKgaXqSgGJk

the good thing with this is it's an optimization for the cpu when using rocket launchers as less actors will be spawned into the map but still having a cool looking smoke trail.
this would also be good for other weapons like lasers weapons,lighting guns, laser sights etc. without needing mass amounts of actors for the cpu to keep track of.