railgun spread
Moderator: GZDoom Developers
- Hamburgermiester
- Posts: 30
- Joined: Sat Jan 09, 2010 2:10 pm
- Location: in b4 halo
railgun spread
I've been modding around at home with new weapons and came across the idea of creating a "railgun shotgun," a shotgun that shoots piercing railgun blasts. I have experimented to no avail with making the weapon itself shoot actors at varying angles that shoot railgun blasts, and I thought of making a fake railgun attack using many actors that look like particles (which would be buggy, and slow the game down to hell). Nothing I could think of worked and I have since given up on that idea.
Now, I am suggesting either an expansion to A_FireRailgun to accomodate a very noticeable spread or A_FireBullets to allow for railgun particles to be spawned for each bullet fired.
Now, I am suggesting either an expansion to A_FireRailgun to accomodate a very noticeable spread or A_FireBullets to allow for railgun particles to be spawned for each bullet fired.
Re: railgun spread
Look at this pic. This was taken by freezing the game then firing 8 railgun shots, moving to the right slightly after each one. See the pattern on the right (number 6) has no core? See how beyond it there are two decals on the wall? Both of these phenomena occur because of the default limit on particles in a level to prevent it "slowing the game down to hell". Shot number 6 doesn't have a core and shots 7 and 8 had no particles at all.Hamburgermiester wrote:(which would be buggy, and slow the game down to hell)
It boils down to 5 and a half fairly short railgun trails with particles. Your railgun shotgun idea is unlikely to work.

- Hamburgermiester
- Posts: 30
- Joined: Sat Jan 09, 2010 2:10 pm
- Location: in b4 halo
Re: railgun spread
Really I wanted them to emenate from one singular spot, and with only the cores. Since you showed me this, I could do with fewer actual railgun shots (I was only planning on using 5 per fire anyway).
And what would've slowed the game down to hell would be handling ALL the actors that are scaled down .png's fading out to look like particles.
And what would've slowed the game down to hell would be handling ALL the actors that are scaled down .png's fading out to look like particles.
- Project Shadowcat
- Posts: 9369
- Joined: Thu Jul 14, 2005 8:33 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: Blacksburg, SC USA
- Contact:
Re: railgun spread
The Suggestion has merit. What if the shot can be a little inaccurate? Leave it to the modder to tell how many inaccurate shots are actually fired.
Re: railgun spread
Hmm, yeah this actually might be a cool idea. I wouldn't mind seeing it in action.
- Hamburgermiester
- Posts: 30
- Joined: Sat Jan 09, 2010 2:10 pm
- Location: in b4 halo
Re: railgun spread
I mean EXTREMELY inaccurate. Inaccurate to the point of being a drunken irishman using a sawed-off inaccurate. But mainly inaccurate enough to be passable as a shotgun type weapon, know what I mean?Project Dark Fox wrote:What if the shot can be a little inaccurate?
Re: railgun spread
He could make a railgun that had no outer spiral, that would reduce the particle count. dramatically. Also, an option for Particle frequency and max rendering range would help alleviate some lag problems.Enjay wrote:Look at this pic. This was taken by freezing the game then firing 8 railgun shots, moving to the right slightly after each one. See the pattern on the right (number 6) has no core? See how beyond it there are two decals on the wall? Both of these phenomena occur because of the default limit on particles in a level to prevent it "slowing the game down to hell". Shot number 6 doesn't have a core and shots 7 and 8 had no particles at all.Hamburgermiester wrote:(which would be buggy, and slow the game down to hell)
It boils down to 5 and a half fairly short railgun trails with particles. Your railgun shotgun idea is unlikely to work.
Re: railgun spread
Finally someone else thinks this way.Eriance wrote:Also, an option for Particle frequency ... would help alleviate some lag problems.

http://forum.zdoom.org/viewtopic.php?f=18&t=20215 :
r_rail_smartspiral - set to 1 to turn off spiral ONLY if there is no inner trail (that is, if inner trail color == -1)
r_rail_spiralsparsity - 0 or below turns off spiral, otherwise controls just spiral sparsity (default 1)
r_rail_trailsparsity - 0 or below turns off trail, otherwise controls just trail sparsity (default 1)
Set spiral sparsity to 2 and trail sparsity to 4 for better performance without it looking reallly bad.
Maybe I should have made it a parameter to the railgun attack instead. Oh well. At least people with older computers can play around with these cvars to get better performance.
Re: railgun spread
I've made a code submission for this (http://forum.zdoom.org/viewtopic.php?f=34&t=25918).