game slows down

Nibbie
Posts: 1
Joined: 2009.02
Post: #1
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..
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #2
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.

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Member
Posts: 254
Joined: 2005.10
Post: #3
If you aren't yet, make sure that you are leveraging core animation properly. Check out this tutorial at Cocoa with:Love.
Quote this message in a reply
Moderator
Posts: 133
Joined: 2008.05
Post: #4
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];
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Timer Slows down in sleep mode chrism 13 5,448 Jun 14, 2009 05:36 PM
Last Post: longjumper