<small id='eKLMz'></small><noframes id='eKLMz'>

  • <tfoot id='eKLMz'></tfoot>
  • <legend id='eKLMz'><style id='eKLMz'><dir id='eKLMz'><q id='eKLMz'></q></dir></style></legend>

      <i id='eKLMz'><tr id='eKLMz'><dt id='eKLMz'><q id='eKLMz'><span id='eKLMz'><b id='eKLMz'><form id='eKLMz'><ins id='eKLMz'></ins><ul id='eKLMz'></ul><sub id='eKLMz'></sub></form><legend id='eKLMz'></legend><bdo id='eKLMz'><pre id='eKLMz'><center id='eKLMz'></center></pre></bdo></b><th id='eKLMz'></th></span></q></dt></tr></i><div id='eKLMz'><tfoot id='eKLMz'></tfoot><dl id='eKLMz'><fieldset id='eKLMz'></fieldset></dl></div>

        • <bdo id='eKLMz'></bdo><ul id='eKLMz'></ul>
      1. 在 cocos2d 中加载大背景图片

        Loading large background images in cocos2d(在 cocos2d 中加载大背景图片)
        <tfoot id='aORyJ'></tfoot>

        <small id='aORyJ'></small><noframes id='aORyJ'>

        <legend id='aORyJ'><style id='aORyJ'><dir id='aORyJ'><q id='aORyJ'></q></dir></style></legend>
          • <i id='aORyJ'><tr id='aORyJ'><dt id='aORyJ'><q id='aORyJ'><span id='aORyJ'><b id='aORyJ'><form id='aORyJ'><ins id='aORyJ'></ins><ul id='aORyJ'></ul><sub id='aORyJ'></sub></form><legend id='aORyJ'></legend><bdo id='aORyJ'><pre id='aORyJ'><center id='aORyJ'></center></pre></bdo></b><th id='aORyJ'></th></span></q></dt></tr></i><div id='aORyJ'><tfoot id='aORyJ'></tfoot><dl id='aORyJ'><fieldset id='aORyJ'></fieldset></dl></div>

                  <bdo id='aORyJ'></bdo><ul id='aORyJ'></ul>
                    <tbody id='aORyJ'></tbody>
                • 本文介绍了在 cocos2d 中加载大背景图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在开发一个使用 cocos2d 和 box2d 开发的 iphone 平台游戏,它必须使用非常大的图像作为背景,我的问题是:

                  Im working on an iphone platforms game developed using cocos2d and box2d which has to use a very large image as a background, my question is this:

                  -加载图像的更好方法是什么?(我说的是一个可以长 14K 像素的图像),是否最好切入较小的图像并在玩家移动时继续加载它们??

                  -which is the better way to load the image?? (I'm talking about an image which can be 14K pixels long), is it better to cut in smaller images an keep loading them as the player moves??

                  -我应该在内存中保持不可见还是使用 addChild 方法在需要时加载它们并使用 removeChild 删除前一个?

                  -Should I keep in memory as invisible or use the addChild method to load them as I need them and the removeChild to remove the previous one?

                  提前致谢,欢迎任何回答:)

                  Thanks in advance, any answer will be welcome :)

                  推荐答案

                  你不能为 iphone/ipod 4 使用大于 1024x1024 或 2048x2048 的纹理(也许 iPad 也是如此).所以渲染这么大的图像的唯一方法是渲染它的部分.

                  You can't use textures larger then 1024x1024 or 2048x2048 for iphone/ipod 4 (maybe iPad too). So the only way to render such big image is rendering it's parts.

                  我会尝试在玩家移动时加载部件(最好在单独的线程中).

                  I would try to load the parts as the player moves (better in a separate thread).

                  也许你也可以使用视差背景.如果是这样 - 使用它.

                  Also maybe it is possible for you to use Parallax background. If so - use it.

                  如果您的图像由许多相同的部分组成,那么使用 CCTMXTiledMap 是个好主意.

                  If your image is made from a lot of identical parts then it's a good idea to use CCTMXTiledMap.

                  这篇关于在 cocos2d 中加载大背景图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                  Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                  Resume game cocos2d(恢复游戏 cocos2d)
                  Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                  Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                  How to convert 32 bit PNG to RGB565?(如何将 32 位 PNG 转换为 RGB565?)

                  <small id='Lwrcw'></small><noframes id='Lwrcw'>

                      <bdo id='Lwrcw'></bdo><ul id='Lwrcw'></ul>
                      <legend id='Lwrcw'><style id='Lwrcw'><dir id='Lwrcw'><q id='Lwrcw'></q></dir></style></legend>
                      <i id='Lwrcw'><tr id='Lwrcw'><dt id='Lwrcw'><q id='Lwrcw'><span id='Lwrcw'><b id='Lwrcw'><form id='Lwrcw'><ins id='Lwrcw'></ins><ul id='Lwrcw'></ul><sub id='Lwrcw'></sub></form><legend id='Lwrcw'></legend><bdo id='Lwrcw'><pre id='Lwrcw'><center id='Lwrcw'></center></pre></bdo></b><th id='Lwrcw'></th></span></q></dt></tr></i><div id='Lwrcw'><tfoot id='Lwrcw'></tfoot><dl id='Lwrcw'><fieldset id='Lwrcw'></fieldset></dl></div>

                        <tbody id='Lwrcw'></tbody>
                          • <tfoot id='Lwrcw'></tfoot>