Yes it is true, my simple game has juddering going on. Which i hate. This post is about the way it looks and the frustration of the problem.
To start with i will list what i am doing in the Update, then follow that with the small list of what is in the draw call.
Update:
- Base update
- Some sprite effects (about 10 or so usually) (i can run thousands with no discernable change in frame rate)
- The hotspot update code
- Game code which tests for win/lose conditions
- Cards control, moves the cards in their inertial direction (14 cards moving total !)
- Base
- Background (fuill screen)
- 16 cards (2d sprites)
- my scales (3 x 2d sprites)
- Some text for score and pause etc
With such a simple game it is quite frustrating to run into these issues. Now maybe i am running into garbage collection issues with the way i am doing something in this code. That is very possible and something i ran into several times on the Xbox development i have done. The effects manager i am using came from the Xbox dev after i optimized it to not produce garbage.
Tonight when i get back to this i will be performaing some more surgery by simply cutting parts out and see what happens. If i cannot trace the problem, then it will be time for some sort of profiling. Something i have no experience on for Xna (yeah, i never needed it for my Xbox shooters, even though Pellmell would gladly put on 10,000 effects etc). As for the extra juddering that happens when i do an Ad.Refresh call (to get a new Ad), i think i might have to come up with a better solution for that, though i have no idea what. The bright spark of hope lies in the fact that one of my mates @KrisWD40 (on twitter) has a great game out and he does not suffer this juddering with his ad manager refreshes (his game is Hypership out of control).
I will report back when i have some news on this, as i am sure other people will run into some similar issues.
Da Voodoochief
No comments:
Post a Comment