Slowdown when usiny EntityOrder on sprites
Blitz3D Forums/Blitz3D Programming/Slowdown when usiny EntityOrder on sprites
| ||
I'm getting some major slowdown when applying using entityorder on some sprites, more than about 20 is enough to hammer the framerate. If I remove the entityorder then I can happily have 1000s of sprites sailing around with no issues. Anyone know why this is? I've tried B3D v1.100 and an older v1.98, same results on both. The sprites are pretty small on-screen, not covering the whole screen. |
| ||
try earlier versions. 164 works but I think the sprites got slower and slower from there. |
| ||
V1.64? I've seen more recent cave paintings :) Try V1.88, there were some tweaks made to sprites in V1.89 which broke stuff, then they were fixed in V1.91. Maybe the fix caused this slowdown? More info about the sprite bug/fix here |
| ||
How did you use EntityOrder, everything -1 or 1, or did you assign individual numbers to each sprite? (like, from -99 to -1). If so, you should try to create the sprites in he same order, or sort them by creation time. Try both, upward or downward sorted. This probably is going to make it faster. I just read in the online manual about the command, but even if it isn't mentioned there I have a slight feeling that the possible values are somehow limited, maybe from -1000 to 1000? I cound be wrong, however. |
| ||
I just read in the online manual about the command, but even if it isn't mentioned there I have a slight feeling that the possible values are somehow limited, maybe from -1000 to 1000? I cound be wrong, however. My guess would be -32768 to +32767 |
| ||
I've just tried using Entityorder -<sprite_number> rather than -1 for all of them, makes no difference at all to the framerate :( With 2000 sprites the rendertime goes from 8ms to 80ms when EntityOrder is used. |
| ||
Sounds as though an expensive renderstate may be being set more often than it should be. Modern versions of DirectX make it impossible to needlessly reset a renderstate, but I'm not certain that DX7 did. Depending on what you're using them for, would it be possible to use quads instead of sprites? Perhaps it's something particular to the parenting/orientation overhead that sprites need. |
| ||
Yeah, i can't understand why EntityOrder is having such an impact. Sounds like a renderstate is being set for every entity, or something. :/ |