How does JSTileMap handle retina and ipad/iphone tile maps?

痴心易碎 提交于 2019-12-03 16:21:14

I was able to narrow down that SKTexture ignores the ~ipad file extension for the @2x file extension. This only created more headaches in trying to build a tile map system for iPhone retina, iPad, and iPad retina.

I have decided to avoid the problem all together. I am not using a universal app in my project now. I have a iPhone project and a separate iPad Project. This way all I need to do to work with Retina is the @2x file extension in each project.

This does fully work (much easier). A word to the wise to those only building for retina iPhones... half your tile height and width sizes in the .tmx files, otherwise you will have a great time trying to deal with the content scaling.

Since you're using Sprite Kit and that requires iOS 7 there's actually no non-Retina iPhone to target anyway.

The thing in that instance is that you can't use @2x suffixed images without providing the same image without the @2x suffix. So the solution may be as simple as supplying the Retina iPhone images without the @2x suffix. You likely don't even need the ~iphone suffix either because the other two types of assets will only be used by the iPad devices.

This is based on an answer to a different question. I haven't personally verified it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!