Texture Packer

Discussion in 'iOS Programming' started by schenker, Oct 7, 2011.

  1. schenker macrumors newbie

    Joined:
    Jul 14, 2011
    #1
    Hi, im developing a game with cocos2d and there are lots of graphics in my game. Should i be looking at Texture packer to optimize the image for better game performance?

    How do you guys manage performance while not compromising on the graphics?

    Pls give me your views.

    Thanks.
     
  2. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #2
    I've personally never used Cocos2d before, although I often consider using it.

    I don't think others here use it, either, but I might be wrong. I would think you would have better luck with getting your question answered if you asked it on stackoverflow or the cocos2d forums.
     
  3. .\\axxx macrumors newbie

    Joined:
    Oct 16, 2011
    Location:
    Brisbane, Australia
    #3
    My 2c:

    All texturepacker does (AFAIK) is move your various graphics into a single image, packing them in as tightly as possible.

    This saves space (memory / disk) in principal because, say, rather than having many images with wasted space, you have one image with less wasted space.

    It makes Cocos2d more efficient too, because if all of the images are in a single texture, Cocos2d can display them to the screen more efficiently (using less graphic calls)

    There's nothing texturePacker does that you couldn't do manually - it just positions the images you give it into one large image with minimal wasted space - and tells you the coordinates of each of the images (and the rotation if necessary) so you can tell your program how to display them.

    Assuming you code your program well, there's no reason why you couldn't just put your images into a texture during development, without worrying too much about efficiency, then if you feel the need, use texturepacker when it's all working.

    to be clear - there's no compromising on the graphics here - exactly the same graphics are used, they're just stored more effectively.

    Cheers

    .\\axxx
     
  4. schenker thread starter macrumors newbie

    Joined:
    Jul 14, 2011
    #4
    Hi, Good info that i needed. Thanks so much!


     

Share This Page