针对多个 iDevices 时资源管理的最佳实践?

发布于 2024-10-05 05:05:12 字数 541 浏览 3 评论 0原文

考虑到iDevices家族正在不断扩大,我想这是比我更多的人都开始遇到的问题:

在写作时如何高效管理资源,例如3D模型、纹理、全屏图像等一个针对多个 iDevices 的应用程序?

基本上这个问题有两个部分:

1)是否可以为同一应用程序向 AppStore 提供单独的捆绑包,其中将为不同的设备提供不同的捆绑包(即用户为 iPad 下载的单独包,而不是为 iPad 提供单独的包)。例如iPhone 3GS)或者是提供似乎在AppStore上流行的“Game X”和“Game X HD”的唯一方式?

2)如果第一个问题的答案是否定的,那么最佳实践是什么?只保留所有资源的尽可能高的分辨率,并在运行时进行下采样或保留现成的图像,例如与 iPad、iPhone 和 iPhone 4 显示屏相匹配的全屏图像?

任何输入&非常欢迎提出建议。我目前的做法是保持 3D 和 3D 效果。设备之间的纹理等效,但保留任何应该完全填满屏幕的现成图像 - 但我觉得这是对带宽的极大浪费,特别是当将其下载到 iPhone 3 时,所有高分辨率图像永远不会出现用过的。

先感谢您!

Considering that the family of iDevices is expanding, I guess this is a problem that more people than me have started to run into:

How do you efficiently manage resources, such as 3D models, textures, full-screen images, etc when you are writing an app that is targeting multiple iDevices?

Basically the question has two parts:

1) Is it possible to provide separate bundles to the AppStore for the same application, where a different bundle will be provided for the different devices (i.e. a separate package the user downloads for the iPad as compared to the iPhone 3GS for example) or is the only way to provide a "Game X" and "Game X HD" which seems to have become popular on the AppStore?

2) If the answer to #1 is no, then what's the best practice? Only keep the highest possible resolution of all resources, and downsample at run-time or keep ready-made for example full-screen images that match the iPad, iPhone and iPhone 4 displays?

Any input & suggestions are very welcome. My current approach is to keep 3D & texture equivalent between the devices, but keep ready-made images for anything that is supposed to exactly fill the screen - but I feel this is an extreme waste of bandwidth especially when downloading it to the iPhone 3 where all the high resolution images will never be used.

Thank you in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谈场末日恋爱 2024-10-12 05:05:12
  1. 您可以针对“游戏”和“游戏HD”提交不同的申请。不过,苹果对此很挑剔 - iPad 版本必须“提供任何附加功能,以将其与仅 iPhone 版本区分开来。如应用程序审查指南第 2.11 节所述” - 否则苹果将拒绝它 - 就像他们对应用程序所做的那样我从他的回复电子邮件中引用了这段话:(

  2. 在创建通用二进制文件时,您可以为资源文件添加前缀,例如:

ipad~图片.xib

iphone~图片.xib

仅包含在适用平台上运行时使用的资源。因此,您可以使用“png”文件等来执行此操作,然后仅加载“picture.png” - 并自动使用正确的文件。

  1. You can submit different applications for "Game" and "Game HD". Apple is picky about this though - the iPad version must "provide any additional functionality to differentiate it from your iPhone-only version. As indicated in section 2.11 of the App Review Guidelines" - or Apple will reject it - just like they did the application from whose response email I took the quote from :(

  2. In creating a universal binary, you can prefix resource files like:

ipad~picture.xib

or

iphone~picture.xib

to have only those resources used when run on the applicable platform. Thus, you can do this with "png" files and the such, and just load "picture.png" - with the proper one being automatically used.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文