Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat's the best design for image-based iphone app?
    text
    copied!<p>I would appreciate some advice on an iphone game design. I want to display some backround image and other images on top of it (buildings, characters etc). The backround is going to be large (up to 10 times the size of the screen) so only a piece of the background file will be displayed at once. The idea is to replace this piece when character gets close to screen borders. I need to make this background transition as a smooth animation. Also, I need to have a zoom in/out feature, preferably animated. Some images on the screen will be static (buildings) and some will require some animation (character walking).</p> <p>What is the best design:</p> <ol> <li>Use <strong>Core Graphics</strong> combined with "sprite" classes - displaying sprite's UIImage with CGContextDrawImage </li> <li>Use <strong>UIKit</strong> - create UIImageview to hold every image and add them as subviews in a single view appplication</li> <li>Use <strong>OpenGL</strong> ES project</li> </ol> <p><strong>Option 1)</strong> turned out to be very slow. It seems like CoreGraphics is not meant to display images in a game loop. But maybe there is a way to make it effecient? Maybe combine it with Core Animation somehow?</p> <p><strong>Option 2)</strong> is my current choice. I am hoping the view to cache the image it holds and thus be more effecient than CG. But will the animation provided by UIImageview will be satisfactory? I think the views shouldn't be added all at once, but rather created &amp; added (removed?) dynamically when background moves. Is it a good idea?</p> <p><strong>Option 3)</strong> would probably give the best control over the images but it seems like quite an overhead. I only need to display images, not vector graphics. Plus I'm new to Mac programming and I don't want to get stuck in some complex technology.</p> <p>I appreciate any advice, thanks :)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload