iPhone 4 Performance Issues

Hi,

I did a search about this, but couldn't find a similar problem mentioned on the forum. I'm currently doing testing on a new app. It's a fireworks game - very simple, all done on one scene, but also heavily utilising particle effects. Now on the iPhone 5, the game runs perfectly (as you'd expect), but on the iPhone 4 it's unplayable-y laggy. Half the time, most of the particles don't even generate!

Even when I tried running a very early version of the game on the iPhone 4 (probably about twelve actors on the scene at max with a total of 3 simultaneous particle effects), it lagged just the same. I'm positive my 'code' isn't perfectly optimised, but I don't think it's that bad. Whenever something is used up or no longer necessary, I make sure to destroy it, and I spawn in actors with a lot of code only when they're needed.

I actually had some iPhone 4 lag problems on a previous, currently unreleased project. That didn't use particles at all, but it would get random, severe lag spikes that had the potential to mess up the game. I figured it was just because it used a lot of actors simultaneously, although the lag was admittedly pretty randomised. Sometimes I could play the game to completion without any major incidents, whereas other times I would have to restart multiple levels because the game lagged out and I died. Full battery life *seemed* to help with this one, but it hasn't made a difference to my new game. That said, my new fireworks game is at least pretty consistent with it's lag.

I should also mention that while my iPhone 4 definitely seems to be ageing, it can still play most games just fine. Although it is still running iOS 5.1; could that be a problem? I kept it on that so that I could test the lowest possible version that people might be playing my games on.

So has anyone else had a similar problem, and/or does anyone have any tips for fixing it? I would sincerely appreciate any help on this.

Thanks in advance!

Comments

  • BazookaTimeBazookaTime Member Posts: 1,274
    I had a similar issue with a basketball game I released. It worked perfectly on every device but was laggy and pretty much unplayable on iPhone 4 and iPod touch 4. The response of the touch controls were also horrible. Sorry I don't have a solution for you.
  • TheGabfatherTheGabfather Member Posts: 633
    Yeah, no solution here either other than to start looking for a better test device (unless you already do).

    I've stopped testing on iPhone 4 ever since I realized that not only do my newer games seem to lag a lot on it, but also because I am seeing less and less iPhone 4 users (I commute, and taking note of the phone models strangers are using is a habit of mine).
  • CriticalGamesCriticalGames Member Posts: 45
    How strange. Glad to hear it's not just me though - thanks for the responses! I was thinking I'd just have to aim for iPhone 5 and be done with it.

    In that case, though, I have another question. I was under the impression that every iPhone game had to be available for iPhone 4 and 5. So what do you do to stop iPhone 4 users from downloading the game? Just a simple message in the description? I imagine that if some iPhone 4 users downloaded it and it lagged terribly, you might end up with a few bad reviews. And I presume that you still have to make it so that the game displays correctly on an iPhone 4 screen?

    Thanks again for the help!
  • Thunder_ChildThunder_Child Member Posts: 2,343
    edited January 2014
    I have had issuea like this...solution...drum roll please.....plttatatatatattaata....

    Drop the particles and spawn actors in lue of your particles. After weeks of trying different setups with particles and always dragging my frames down to like....1....I tried using actors with similar attributes and BAM.....worked fantastically. Now you cant just spawn a bagillion actors at once but find the balance And I assure you, you will say "FINALLY"....and be sure to give ol Thunder an awesome i it works. B-)
  • Thunder_ChildThunder_Child Member Posts: 2,343
    And just a extra bit of info...I was not doing fireworks...I was making debris fly out from exploding enemies in a space game. Pretty intense explosions too so I believe it will help you.
  • CriticalGamesCriticalGames Member Posts: 45
    Thanks a lot for the suggestion Thunder_Child! I created an actor to be the particle, and I got it dispersing in the same sort of way as the particle system. I tested it on the iPhone 4 (so no particle effects running, only actors spawning), and I still got lag on about the same level.

    And even then, I couldn't get the particle actors quite right. Despite using the same image and behaviours, I can't get the size, shape, or glow looking right no matter what I do.

    Thanks again for the suggestion though - it was worth a shot!
  • TheGabfatherTheGabfather Member Posts: 633
    Yes, you will need to support the screen resolution of iPhone 4/4S.

    I normally test with the 4S after I finish developing the game for the iPhone 5+ screen resolution. The performance of the 4S always suffices for me (i.e. very minimal performance loss at times, if at all -- good enough).

    I have one game in particular that deals with a lot of particles. On the 5S it's perfectly smooth, while on the 4S it has a chance of getting a 5-7 fps hit at times. What I did was to include a 'Speed Hack' option in the Settings page, that simply decreases the amount of particles in the game. I just leave it "Off" by default.
  • CriticalGamesCriticalGames Member Posts: 45
    Okay, thanks for the tips! That's a good idea - I'll try it out and see if it helps!

    Like I mentioned in my previous message, though, how do you stop people with a normal iPhone 4 from purchasing the game, as I'm sure they wouldn't be too happy if the game lagged out on their device. Just a message in the app description, or is there something that you can set up in iTunes Connect, etc.?
  • imGuaimGua Member Posts: 1,089
    edited January 2014
    Performance difference for my GS game on iPhone 4 and 4S is very noticeable. Also I've noticed that on some pretty cheap Android phones my games runs a lot better than on iPhone 4.
  • Thunder_ChildThunder_Child Member Posts: 2,343
    Bummer. Hope you find a solution. A fireworks display would be cool...and unique.
  • CriticalGamesCriticalGames Member Posts: 45
    edited January 2014
    Ah well, thanks for all of your help everyone! I really appreciate you all taking the time to respond. I think from now on, I'll just aim for the iPhone 5 and see how things turn out :D
  • BigDaveBigDave Member Posts: 2,239
    edited February 2014
    Is there any hope that we don't have to support iPhone 4 models anymore, within this year? I mean there will be very probably soon the iPhone 6 too. Making 5 to the new standard.

    I got no problems with supporting 4 but it will lag very hard even by removing particles completely.

    Maybe by then the most people also just realized that it's their crappy old phones.
Sign In or Register to comment.