I've nearly finished my game and unfortunately I'm having a huge frame rate drop issue.
On my HTC Droid Incredible 2 the frame rate will drop after
my ship fires its weapons and continues to drop well below 10 and doesn't really recover when less sprites are on screen.
I tried using:
update(0)
render2dfront()
swap()
Which tremendously helped on my Nexus 7 but not on the HTC (runs android 2.3.4).
I think the issue might be that I'm updating the sprite collision shape of my ship, the bullets, and the enemies every cycle.
But I'd like to confirm that with you folks because it also seemed to happen when I added a bunch of assets and the size of the media folder got to about 6mb.
Most of the images need to be scaled down quite a bit since I developed them in much higher resolution than is ultimately needed.
But the images on the HTC will always need to be scaled down since I need to have the game look good on 1280x768 and the HTC's resolution is much smaller at 800x480.
Most of the sprites on screen are clones. Does each clone need to take the original texture and scale it properly or does it rely on the scaled texture of the original sprite?
It seems like the SetSpriteShape command should be pretty light weight, but I suppose if I'm doing it on 12 sprites * 45 times per second = 540 updates per second... still doesn't seem like a lot.
I get the same results under 1076 using Sync().
I've also tried using mode 0 and mode 1 on SetSyncRate as well as altering the syncrate anywhere from 30 to unlimited, still the issue remains.
So, I'm sorta stuck on how to tackle this. Should I start reducing the texture sizes or should I remove my calls to SetSpriteShape()?
If I need to remove my calls to SetSpriteShape() does anyone have suggestions on how best to shape the collision for a sprite with multiple frames that are oddly shaped? I have a few sprites that are best served by long rectangles, but they rotate.
Thanks!!