AndEngine 中的 TMXLoader
我使用 png 格式进行平铺,并使用 TMXLoader 加载我的平铺地图。当我的代码在 Android 设备而不是模拟器中运行时,出现了问题。不知何故,任何使用 png 作为后端(地图)的图像在设备中都会显示为灰色。但是,我的 tmxLoader 似乎可以很好地加载平铺地图,根本没有抛出异常。我将给出设备和模拟器中的屏幕截图。这是 android 中的问题吗(也许是 libpng ?)。
I'm using png format for tiling and using TMXLoader to load my tiled map. The problem occured when my code running in android device not in the emulator. Somehow, any image that use png for backend (map) is displayed grayly in the device. However, my tmxLoader seems to be fine loading the tiled map, no throwing exception at all. I'll give the screenshot in device and emulator. Is this the problem in android (maybe libpng ??).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,已经解决了。这是因为我创建的 png 格式(可能是因为保存 png 时的一些选项)无法被 tmx 加载器引擎读取,因为后来,我尝试在不使用任何选项的情况下保存它,它在设备中加载得很好(已解决)
ok, it's solved. It's because the png format that i created (maybe because of some options when saving the png) cannot be read by tmx loader engine, because later on, i tried to save it without using any options at all, it loaded nicely in the device (solved)