iOS 中的纹理和动画
我正在开发一款支持 iPhone 视网膜的游戏。
这个游戏有很多精灵表可供使用。 MyQuestion 最好使用
- pvr
- pvr.gz
- pvr.ccz
- 或普通 png 格式,
这是使用精灵表的最佳实践。
I am developing a game for iPhone retina enabled.
This game has alot of sprite sheets to be used.
MyQuestion which is better to use
- pvr
- pvr.gz
- pvr.ccz
- or normal png format
which is the best practice for using sprite sheets.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
反问:开跑车好还是皮卡车好?
这取决于您的特定用例。如果您无法承受任何质量损失,您将使用 PNG。如果内存和渲染速度更受关注,您将使用 PVR。
GZ 和 CCZ 只是压缩算法,用于确定数据的打包程度以及加载速度。我听说 PVR.CZZ 加载速度最快。
现在,让我好奇的是你说你有“很多精灵表”。理想情况下,您希望在场景中使用尽可能少的(最好:1)精灵表。如果您为每个游戏对象创建一个精灵表,那么您的处理方式就错误了,精灵表(纹理图集)不是用于构建和分类图像资源的工具!您的目标应该是将尽可能多的图像填充到单个精灵表(纹理图集)中以提高渲染性能。
在某些情况下,您甚至需要复制某些图像,以便可以为当前场景(关卡)创建单个纹理图集,即使这意味着要复制其他场景中的某些图像。
Counter-Question: Is it better to use a sports car or a pickup truck?
It depends on your particular use case. You'll use PNG if you can't afford any loss in quality. You'll use PVR if memory and rendering speed are of higher concern.
GZ and CCZ are simply compression algorithms that determine how well the data is packed and how fast it can be loaded. I hear that PVR.CZZ is the fastest to load.
Now, what made me curious is that you say you have "a lot of sprite sheets". Ideally you'll want to be using as few as possible (best: 1) sprite sheets in a scene. If you create a sprite sheet per game object you're approaching it the wrong way, sprite sheets (texture atlases) are not a tool to structure and categorize your image assets! Your goal should be to cram as many images as possible into a single sprite sheet (texture atlas) to improve rendering performance.
In some cases you'll even want to duplicate some of your images so that you can create a single texture atlas for the current scene (level) even if that means to duplicate some images in the other scenes.