Slick Forums
http://slick.ninjacave.com/forum/

Slick renders the same tile for all tiles in tmx map
http://slick.ninjacave.com/forum/viewtopic.php?f=3&t=8442
Page 1 of 1

Author:  junbao23 [ Wed Oct 18, 2017 11:05 pm ]
Post subject:  Slick renders the same tile for all tiles in tmx map

I used TileD to create a map and asked Slick to render it. However the map didn't render correctly. Slick rendered all tiles as the first tile in the tile set.

But in debug mode, I checked the ID for different tiles. It gave different IDs which means they should be different tiles but they look the same.

I created the map using TileD as below:
Attachment:
Screen Shot 2017-10-18 at 4.04.03 PM.png
Screen Shot 2017-10-18 at 4.04.03 PM.png [ 131 KiB | Viewed 6798 times ]


But it was rendered like this. Grass is the first tile in the tileset. Then everything becomes grass.
Attachment:
Screen Shot 2017-10-18 at 3.55.53 PM.png
Screen Shot 2017-10-18 at 3.55.53 PM.png [ 249.35 KiB | Viewed 6798 times ]


I just showed the up left corner.

Could someone help?

Author:  Stef [ Thu Oct 19, 2017 9:30 pm ]
Post subject:  Re: Slick renders the same tile for all tiles in tmx map

Hello :)

Can you show us the code you used to render that map?

Also did you create different layers? or just one?

Also checkout the slick Tiled test in the test dir

It shows how to load and display a tilemap, can you try to run that?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/