Closed GoogleCodeExporter closed 8 years ago
I have the same issues here,
also when you do a TintBy() or setColor() on the object in the layer above the
tiledLayer, then some tiles will have the same TintBy/setColor behaviour as the
object above the layer.
Original comment by erwin.ja...@gmail.com
on 4 Feb 2011 at 2:21
I'm also experiencing problems with CCTMXTiledMap, even just with the default
.tmx files supplied with cocos2d. I've downloaded the latest revision from
github as of March 4th 2011, jar-ed up the source, and created a brand new
project (with a copy of the assets from the original in the assets folder), and
a very stripped down main activity, attempting to load a .tmx into a layer.
I've attached the exported project.
As you can see, no tile map appears at all. I've tried substituting a few
other tile maps but they don't work either. The ones that do work only display
a single tile, similar to test2.png above.
Furthermore, I'm trying to create tilemaps with Tiled, but ones I generate from
scratch appear to kill cocos at runtime with an endless series of recursive
NullPointerExceptions (this is not included in the current upload).
Original comment by tony.ada...@gmail.com
on 15 Mar 2011 at 5:48
Attachments:
tony, the problem yo face with tiles from tiled may be caused by the default
encoding of the maps generated with tiled. you should change them to base64
with gzip compression (that worked for me). but even if they did not crash, i
face the same problems as others with tiled maps.
Original comment by roberto....@gmail.com
on 29 Mar 2011 at 11:15
Hi.. I'm still not able to display the TMX Map. I checked the Tiled Map Editor
encoding, and it was set to Base 64 GZipped compression. All I get is a blank
screen with the FPS. Nothing else.
Thanks for the help in advance,
Abhimanyu
Original comment by abhimany...@gmail.com
on 16 Jun 2011 at 12:55
[deleted comment]
Hi Abhimanyu,
I've changed the Tiled Map Editor encoding to Base 64 GZipped compression and
it works for me but the result displayed was the same of first post.
Original comment by leoapgo...@gmail.com
on 22 Jun 2011 at 2:39
Hello,
I had the same issue and after analyzing it found (at least) a workaround (at
least for me). I wrote the following class:
public class TCCTMXLayer extends CCNode {
private CCTMXLayer layer;
public TCCTMXLayer(CCTMXLayer layer) {
this.layer = layer;
}
@Override
public void draw(GL10 gl) {
gl.glDisableClientState(GL10.GL_COLOR_ARRAY);
layer.draw(gl);
gl.glEnableClientState(GL10.GL_COLOR_ARRAY);
}
}
, and used it to add tiled layers and sprite sheet with sprite to a layer:
CCParallaxNode pn = CCParallaxNode.node();
pn.addChild(new TCCTMXLayer(map.layerNamed("back1")) , -2, 1, 1, 0, 0);
pn.addChild(new TCCTMXLayer(map.layerNamed("mountain")), -1, 0.7f, 0.7f, -18, -18);
pn.addChild(new TCCTMXLayer(map.layerNamed("main")), 1, 1, 1, 0, 0);
pn.addChild(aSheet,2, 1, 1, 0, 0);
addChild(pn);
At least for me the problem was fixed after this workaround.
I'm really new to cocos2d (and graphic engine in general), so don't blame me
hard if I wrote something stupid =] .
Original comment by pboklas...@gmail.com
on 11 Jul 2011 at 8:44
[deleted comment]
Hello Weikuan,
I found probably better, more logical, way to fix the issue in CCTextureAtlas draw method:
if (withColorArray_) {
gl.glEnableClientState(GL10.GL_COLOR_ARRAY);
gl.glColorPointer(4, GL10.GL_FLOAT, 0, colors.bytes);
}
else
// Disable color buffer if it hasn't been initialized
gl.glDisableClientState(GL10.GL_COLOR_ARRAY);
Best Regards, Petr Boklashov.
Original comment by pboklas...@gmail.com
on 13 Jul 2011 at 5:55
[deleted comment]
Yes, you'r right, it needs to be enabled after the draw.
Original comment by pboklas...@gmail.com
on 13 Jul 2011 at 11:04
[deleted comment]
Hi Weikuan,
Can you please confirm that the code for rendering TMX files properly has been
tested and integrated into the Github repository.
Thanks,
Abhimanyu
Original comment by abhimany...@gmail.com
on 9 Nov 2011 at 1:32
[deleted comment]
Thanks a lot Weikuan. :)
Abhimanyu
Original comment by abhimany...@gmail.com
on 10 Nov 2011 at 6:18
hi,
i am not able to load .tmx file.
can anyone plese help me here?
regards,
g bali
Original comment by guru.sin...@gmail.com
on 28 Feb 2012 at 6:14
hi all,
I m new to cocos2d-android.
I m not able to load .tmx file.
and how it works please help me.
Regards
Achin
Original comment by achingup...@gmail.com
on 7 Mar 2012 at 3:16
Original issue reported on code.google.com by
Plin...@gmail.com
on 29 Jan 2011 at 2:41Attachments: