[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/vr/ - Retro Games

Search:


View post   

>> No.4465616 [View]
File: 1.11 MB, 1600x900, file.png [View same] [iqdb] [saucenao] [google]
4465616

Some experementation on practical sprite/particle performance impact, using A_RailAttack with 1 pt sparcity to spawn actors/particles in a straight line in ~2240 units long corridor
Actor is a single-pixel sprite that holds for 20 sec then dies
Rails are basic rails with no coil, rail stays for 20 sec, drifting at 0.01 speed
Particle limit is maxed out (65535)
Particles are square

To bring FPS from 240 down to 60
7 actor rails (~15680 actors) (while frozen - no ingame logic running) 60-61 fps
6 actor rails while not frozen (13440actors ) - very basic ingame logic running, 59-60 fps
27 particle rails (60480 particles), freezing/unfreezing game logic has no visible effect 60-61 fps
Round particles result in 58-59 fps
Smooth particles result in 56-57 fps.

For some bizzare reason +nointeraction flag SOMETIMES increased the impact of the actor rails, to the point when spawning 6 actor rails resulted in 50 fps instead of 60, consistently during the play session. (i.e. spawning same ammount of actors results in same -worse- performance)
Different playsession with exactly same actor results in ~10 fps gain at the same circumstances.

Still, it seems that 1 drifting particle is about 4 times as efficient as a single 1-pixel actor used to emulate a square particle, applying alpha/smoothness/roundness to particle has insignificant performance impact.

Conclusion: rewriting a particle system to allow useage of basic sprites and animations, as well as purey math-based trajectory algorithms (with no interaction) would in turn allow creation of much more efficient basic explosion and other special effects.

Also learning how to spawn a lot of particles and making them move in a desired way in current condition would allow to severely reduce performance impact in place where particle-imitations were used.

Navigation
View posts[+24][+48][+96]