Hi, everything is working in my game so far 🙂
But I have noticed that we have serious performance problems on older single-core phones like my HTC Desire Z (512MB, 800MHz).
I have tried solving that in two ways so far:
- Loading sprites from spritesheets: Until now I have just been using Image elements for my graphics, loading every sprite from a separate PNG file (~20 files of ~100×100 pixels). I understand that loading them from one spritesheet would be a great performance gain. But the problem is, when using sprites from a spritesheet, you can’t seem to dynamically adjust their Z-values, which I need for my game as we discussed earlier. Or am I just doing it wrong? I have the SingleSpriteFromSpriteSheet element as child of my entities.
- Particle effects: When moving blocks I use particle effects. I want a little bit of smoke coming out of the Block when it slides across the field (only for not even half a second). It looks very cool i think, but they seem to be causing performance problems. When I disable them, the performance problems are gone. Maybe I just didn’t set them up right, would you be so kind as to look into my particle configuration:
SmokeParticles.qml
Particles {
property real vectorZ: 1000
textureFileName: "../resources/particles/particleSmoke.png"
duration: 0.1
emissionRate: 60
maxParticles: 1000
particleLifespan: 0.3
particleLifespanVariance: 0.02
sourcePositionVariancey: 0
sourcePositionVariancex: 0
sourcePositionx: 0
sourcePositiony: 0
startColorRed: 0.75
startColorVarianceRed: 0
startColorGreen: 0.75
startColorVarianceGreen: 0
startColorBlue: 0.75
startColorVarianceBlue: 0
startColorAlpha: 0.800000011920929
startColorVarianceAlpha: 0
finishColorRed: 0.1000000014901161
finishColorVarianceRed: 0
finishColorGreen: 0.1000000014901161
finishColorVarianceGreen: 0
finishColorVarianceBlue: 0
finishColorBlue: 0.1000000014901161
finishColorAlpha: 0
finishColorVarianceAlpha: 0
startParticleSize: 7
startParticleSizeVariance: 3
finishParticleSize: 30
finishParticleSizeVariance: 10
gravityx: 0
gravityy: 300
angle: 90
angleVariance: 60
speed: 10
speedVariance: 0
radialAcceleration: -30
radialAccelVariance: 10
blendFuncSource: 770
blendFuncDestination: 771
emitterType: 0
minRadius: 0
maxRadius: 100
maxRadiusVariance: 0
tangentialAcceleration: 0
tangentialAccelVariance: 0
}
As texture i use the particleSmoke.png from the StackTheBox game.