- Home /
Ipod touch 2g lag on application.levelload
So I have created my iphone app and successfully implemented it on my ipod. However, it only seems to work well on the first level. When I program some action to call on the script "Application.LevelLoad" the new level that is loaded has much more lag when compared to when it is loaded when the game starts up. I have built two versions of my game. One where it loads the level first and when I complete it the menu (this works fine), and another that loads the menu first and when play game is clicked, the level is loaded (this version has a lot of lag).
Also, this lag only occurs when I put the game on my ipod, when I play my game on my computer, there is no lag either way.
How can I fix this and remove the lag? Thanks a lot.
***Edit: I just loaded my same game that had lag on my ipod touch 2g onto my dad's ipad. On the Ipad, it ran fine and without any glitches at all no matter how many times I reloaded the level.
Answer by Jessy · Mar 20, 2011 at 12:56 AM
Your issue is primarily one of memory constraints. The old iOS devices don't have much memory, and are slow in general. You can try optimizing, but it's probably not worth it. Apple doesn't support the devices anymore, as of iOS 4.3. You should consider taking the same approach.
If you want to optimize, take all the steps to reduce what's loading. The biggest difference you should get is from reducing texture resolution. Quality Settings will allow you to do this easily.
But why would it work fine on the first load and not on the second? Wouldn't it need memory to hold the menu screen even when it starts up?
That doesn't sound like anything you asked in your original question. I don't know what you're asking here.
Alright, So when I create an application with the menu as level 0 and the fps level as level 1, the fps level runs very slowly and it seems there is a lot of lag. However, when I create an app where my fps level is level 0 and the menu is level 1, when the app starts up to the fps level, it runs fine without any lag at all. However, when I beat the level and go back to the menu and then reload the level, the reloaded level runs just as slow and lags just as much as in the first instance.
In both instances the app the same size, and all the memory is not used up (deter$$anonymous$$ed with another app)
never $$anonymous$$d... I rebuilt it and now it works fine!
Your answer
Follow this Question
Related Questions
iPhone 4 game lags 2 Answers
Why do my first few collectable/powerup collisions cause lag but not later ones? 1 Answer
Massive lag due to Font.CacheFontForText. Please help! 1 Answer
Replacing iTween.MoveUpdate with iTween.MoveTo 1 Answer
iOS. Jerks in first 15-20 seconds after starting scene 0 Answers