I'd be glad to see new particle systems in the engine of ZDoom because the always made up a great atmospherical addition to our maps. What I have in mind?
- Generic Particle Fountain (arguments are as followed: 1. amount of particles, 2. height of fountain, 3. speed of fountain, 4. horizontal fountain angle
- Snow Particle Thing (produces randomly snow, arguments can be the amount of snow, the size of the snow thing (just as bridge things and their radius), maybe even the color (for yellow glowing hellish sparks or stuff)
- Horizontal Particle Fountain (doesn't produce particles from below but can be placed on walls, just for slimefalls, waterfalls or else)
- Single Floating Particle (arguments are for colors (rgb) and translucency, system creates one floating particle without gravity. Might be useful and interesting to create particle objects just like the deathstar in the first map of "Dark Forces")
- Rain Particle Thing (just the same as the snow, just faster and makes small particle splashes when hitting the floor Smile)
Personally, I think the snow particles and whatnot could be implemented like the MAPINFO flag that makes sky ceilinged sectors have fog. It would be easier to use that way, too, as all the sectors with sky would spawn some preset amount of snow at random.
Why does everybody think that particle snow is less expensive than sprite snow?
The thing that costs so much time is only the collision detection. And you'd have to do that for particle snow as well unless you ignore it. But then sprites would work almost as well.
I downloaded a map that had a bunch of particle snow (as well as a bunch of other effects using a similar system). It was for Zdoom. Maybe you guys can use that? It just spawns a bunch of floating projectiles from a sector's sky.
Graf Zahl wrote:... and perfectly kills the performance.
I forgot to mention it was done by sprites.
Zeg-Vok wrote:Theres alwyas what Scuba Steve did in GhostBustersDoom2, the level with the haunted house and the mancs for some reason, just replace Rain, with snow
That only works because his sky was 128 units or so in height. You'll need ot make heigher and heigher sprites. The better idea is to make a invisable acter that that shot snow randomly. Makes this actor a ceiling hugger and you're set. Though, it would take some time before the snow starts to fall when the map starts.
The problem isn't sprite vs. particle. Whether you draw a texture or a white square is mostly the same. What is expensive is the collision checks for the snow. You don't want it to pass through solid walls or the floor, do you?
I suppose if the level was solely outdoors it wouldn't matter wether the snow passed through the walls or floors, but for the average doom level i can see where this would be a problem. Any idea how other games pull this off without overly taxing performance?
You can also have a limit of the range to which snow/rain is spawned (See Sonic Robo Blast 2: It can handle heavy rain on this thing without any noticable slowdown because it only renders rain for 1024 units in front of the camera. I think the code that works with the snow is in p_mobj.c)
TheDarkArchon wrote:You can also have a limit of the range to which snow/rain is spawned (See Sonic Robo Blast 2: It can handle heavy rain on this thing without any noticable slowdown because it only renders rain for 1024 units in front of the camera. I think the code that works with the snow is in p_mobj.c)
Like hidden surface removal for sprites, not too shabby.