running slow - quick question

Asobu_GamesAsobu_Games PRO Posts: 261
edited November -1 in Working with GS (Mac)
Hi guys, I'm currently testing my game 'Ninja Tap' on the iphone and it's going pretty well so far. I sorted out all the blurry images and it looks very nice and crisp now. Only problem is that the game slows down (frame rate) and gets a bit shuddery when things start to get a little hectic on screen. I am testing on an iphone 3G and will also test it on a friends iphone 4 tomorrow.

So my question is, what would be mostly causing the slow down:
1) too many actors/images spawning on screen at once
2) actor images are too big (sprites are png24 at 72dpi - roughly 100-200kb each)
3) too many conditions/rules all happening at once
4) all of the above

Ideally I'd like it to run smoothly at least on 3G model and above.

Comments

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    It could be one of those things, or possibly a little of each. Spawning being the biggest culprit in that list.
  • Asobu_GamesAsobu_Games PRO Posts: 261
    Thanks, i am using an Ad Hoc build and still running a little slow. It's fine for most of the game, but the sprites spawn more and more frequently as the timer gets closer to 0 (for a scaling difficulty level). Towards the end it's a bit slow. I suppose I'll go through and see where I can cut down.

    There really is a lot spawning at the end (maybe 20 actors per second) so I'll cut that down. The idea was to feel overwhelmed at the end, but I think I can scale it back without losing that feeling.

    Thanks.
  • Asobu_GamesAsobu_Games PRO Posts: 261
    Hmm very interesting idea, I never thought of that. I figured that spawning/destroying would actually be less taxing on the game performance rather than keeping them constantly in the scene. Guess I was wrong.

    My only problem is I want them to spawn/appear at different (random) locations each time. I suppose I would have them interpolate to a random spot, then become visible (and hittable). I'll try that and see if there is much difference.

    Thanks! :)
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Yeah, 20 spawns per second is your culprit. Like Uptimistik said, having them offscreen, or alpha set to 0 is less taxing on the device, but at the same time, doing it like that will also increase your screen loading times, so it's a balance you have to work with to get to an acceptable medium.
Sign In or Register to comment.