game slows down
hi..im developing a game in which i drop fruits at a particular interval
and the fruits move down...it works perfectly when at a time 3-4 fruits(UIImageViews) are present simultaneously and r moving down..but as the number of fruits increases the fruits coming down jerk a little...the time difference by which the fruits are generated jerk while coming down is 0.55s
increaseing this time interval slows down the game and can be easily finished...so i need a way to stop this jerking of fruits coming down...keeping the generation time same..
and the fruits move down...it works perfectly when at a time 3-4 fruits(UIImageViews) are present simultaneously and r moving down..but as the number of fruits increases the fruits coming down jerk a little...the time difference by which the fruits are generated jerk while coming down is 0.55s
increaseing this time interval slows down the game and can be easily finished...so i need a way to stop this jerking of fruits coming down...keeping the generation time same..
You might want to consider using OpenGL ES instead of UIKit for graphics of this nature. It sounds like you are just trying to do too much for the iPhone processor to handle smoothly. OpenGL will be significantly faster.
If you aren't yet, make sure that you are leveraging core animation properly. Check out this tutorial at Cocoa with:Love.
Don't use a UIView subclass, just use a CALayer.
Code:
CALayer* fruitLayer = [CALayer layer];
[fruitLayer setContents:(id)[[UIImage imageNamed:@"Fruit.jpg"] CGImage]]];
[[myMainView layer] addSublayer:fruitLayer];
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Timer Slows down in sleep mode | chrism | 13 | 5,195 |
Jun 14, 2009 05:36 PM Last Post: longjumper |
|

