How to avoid a double-up of effort for retina, when using tile maps from Tiled with Cocos2d(使用 Tiled 和 Cocos2d 的平铺贴图时,如何避免对视网膜的双重努力)
问题描述
I've got retina tile maps working, 15x10 tiles, of 64x64 tiles. problem is for non-retina devices I will need to make a 15x10 tiles of 32x32 tiles. I don't want to recreate the Tile, is it just a case of changing the XML (.tmx) file? Is there an automated tool or another way around this? I've been looking online but not getting too much help.
Thanks
You have to update the TMX file and scale certain attributes. Unless your TMX map is very simple this will be a tedious and error-prone task that's best left to a tool.
There are a variety of TMX rescaling tools out there, but some didn't work for me or simply were incomplete at the time (ie one didn't scale object layers). All the tools I know are generally are written in rather unusual languages (for an iOS developer at least) like Python, Ruby or Bash scripts. Others are only available as binary without the source code.
Check out this cocos2d forum post. Specifically this tool or HDx on the App Store. iTilemaps might also work for you.
Because I wasn't happy with either of the choices, I wrote my own command line tool tmx2scale in Objective-C to rescale TMX maps intelligently in all directions. The tmx2scale tool is not currently available but it will be distributed complete with source code with the KoboldScript Game Kit project.
这篇关于使用 Tiled 和 Cocos2d 的平铺贴图时,如何避免对视网膜的双重努力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 Tiled 和 Cocos2d 的平铺贴图时,如何避免对视网膜的双重努力
- Android viewpager检测滑动超出范围 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01