cocoa touch - How can I animate manually on the iPhone? -


I have found a very simple "game" set up on iPhone, things revolve, revolve, you can talk to them , e.t.c. In the simulator, it runs fine, but it gets approximately 0.25 fps on the device, and it is very slow that apparently there is no time to recognize the touch. / P>

It was basically using a UIView with only a code item, each of which had a tick and a draw function. At the beginning of the app, I started a timer which shoots at 60 fps, which is tick, and at the end of the tick, it calls [self setNeedsDisplay];

It was working very slowly, so I changed the item class to the subclass of the CALayer class, Instead of preparing the item, rotate the layer. However, I was running CALayer near the frame-by-frame manually, and this is apparently not good at all. It was still very slow so I asked it to go to its final destination and gave it the length of the number of ticks carrying it to get it.

It works fine, but in such cases, when you talk to something, it should stop proceeding like this and instead you should do something else. That's why I went back to move every tick, and instead of just setting up the new situation, I wrapped it in the catconsense and gave the transaction the same tick.

Works fine, but new problem arises: If I want to animate something, then I will have to use every tick [auto-set display], which is Dryconcontext: , and it seems to be a major slow issue

Is there no way to manually drag everything like I was doing earlier? I was just calling CGContext *, and it worked fine in the simulator! If I implement something similar on J2ME or embedded C ++ then it will work fine. What am I missing? Do I really need OpenGL to learn any kind of interesting manual animation?

Not sure about CG animation layer but OpenEXL is the answer to the high performance graphics of iPhone I You will get better performance at the end of Working with OpenGLS can be a pain, but if you start with the working code (see the texture and look of the scaling app), then you should be able to summarize the thing that you have around / Nearby is required.

All honesty I was not happy about using OpenGLS to draw some 2D sprites, but I'm getting almost 50 fps with full physics and scripting layer so I think That's worth it.


Comments