tilemap 最大的鲸鱼有多大可以拼多大地图

求教,困扰了3天的tilemap的问题,手机上使用tile不能太大? - Cocos2d-x Forum
T08:24:42Z —
我用Cocos2d-html5-v2.1.5和v2.2.2版本都试过,都出现同样的问题代码很简单,复制模板 在myapp里加载显示cc.TMXTiledMap.create一张地图
当我用tile编辑器生成tmx文件时发现1: 把Map的宽高或者tile的宽高设小时,在iphone4s上正常显示,在电脑上用谷歌浏览器也正常2: 当大于一定的阀值时(例如tile宽高66),则在iphone4s上地图完全不显示,但精灵还是能显示出来的,在电脑上用谷歌浏览器也正常
因为手机不方便测,电脑上用谷歌浏览器调试也正常,
即时我代码一路追踪进去还是看不出个所以然来,不明原因,求教谢谢!:)
(430.3 KB)
pandamicro
T08:56:33Z —
This is probably due to iOS texture size restriction. When a single canvas or an image is bigger than a certain size, the browser stops to load it. And our TMXLayer cache the entire layer in a canvas, so its size equals to the tile map size. Briefly that's the reason.
Unfortunately we can't walk through the problem except make tile map smaller with the current design of TMXLayer. But we are looking forward to refactor it very soon.Sorry for the inconvenience

我要回帖

更多关于 最大的胸有多大 的文章

 

随机推荐