AndEngine 中的 TMXLoader

发布于 2024-12-13 23:17:24 字数 323 浏览 3 评论 0原文

我使用 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 ??).

emulator image
device image

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

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

发布评论

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

评论(1

快乐很简单 2024-12-20 23:17:24

好的,已经解决了。这是因为我创建的 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)

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