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.
This contains ZScript code for a waterfall fog spawner meant to be placed at the bottom of waterfalls. They can be placed and configured from Ultimate Doom Builder. Feel free to use this in your maps. Credits are appreciated but not required.
Man, you're a genius! I am not a programmer, but in my opinion your mod is really very useful and I would love to take it to my TC, but, alas, it is only for GZdoom 2.0.03, where ZScript has not been yet, and therefore I can only look at your screenshots and sigh.
And so, I repeat, your mod is just wonderful! I wish you success in your work.
Bratish wrote:I would love to take it to my TC, but, alas, it is only for GZdoom 2.0.03, where ZScript has not been yet, and therefore I can only look at your screenshots and sigh.
It would theoretically be possible to do this without zscript, but apart from being much more complicated and cumbersome, it would also have a greater performance impact (I've used some zscript-specific methods to make these objects as cheap as possible), so I probably won't be doing that. (I do kinda have to wonder why you're limited to a specific GZDoom version...)
It would be cool if you included your test map with the distribution so that people could see it in action quickly, but it's easy enough to set up anyway.
It would be cool if you included your test map with the distribution so that people could see it in action quickly, but it's easy enough to set up anyway.
Yes, I've thought about it, but I'm not sure how to best arrange that so that it doesn't interfere with people who just want the effect in their maps. Maybe just attach the wad file to the github release?
I don't think your concern is a big one anyway. If people want to incorporate it into their maps properly, they'll need to put the separate elements into their project PK3 and they could just leave the map WAD out.
While this effect is truly beautiful and looks real, it is highly demanding on system resources. When I put like 20 waterfall spawners around my map, the FPS dropped from average 25 (old i5 with intel integrated graphics) to something lower than 15 fps, sometimes like 5 fps. When I removed the waterfall actors from the map, it is back on 25.
Could you try to optimise this? The performance impact on my newer system is less than noticeable (ryzen 7 3750 and rtx 2060), but my second laptop is barely struggling to run it.
Performance impact significantly reduced. Waterfall fog particles aren't respawned, instead the same particles are reused.
Fog particles will animate more slowly if the player is far away (1 tic slower per every 256 map units of distance). This effect is clientside-only but should be compatible with multiplayer since the waterfall spawner and particles are non-interactive.
Added argument #4: density. The higher the number, the less frequently fog particles will spawn. For example, if your waterfall is 128 units long and argument 4 is 8, a waterfall fog particle will be spawned every 8 units along its length, meaning 16 in total. The default value is 1 and it usually works, but if you use higher scale values (argument #3), then you might want to reduce the density.
From now on you need to place the waterfall fog spawner at the center of the waterfall linedef (not the edge), and make sure it faces away or towards the linedef (not alongside it).
Last edited by Jekyll Grim Payne on Sun Oct 10, 2021 1:45 pm, edited 2 times in total.
Script warning, "Waterfall-Fog-Spawner.pk3:zscript.zs" line 94:
Truncation of floating point value
The zscript file in the PK3 has today's date so I'm pretty sure I have the right version.
Ah yes... that's because the visdist variable that the visibility check value is recorded to is still an int... Well, that won't cause any issues anyway. I'll push a commit but won't make a new release for now.