Slick Forums

Discuss the Slick 2D Library
It is currently Fri Oct 19, 2018 2:53 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: LayerID anf TileId
PostPosted: Sun Jan 23, 2011 12:09 am 
Offline

Joined: Fri Jan 21, 2011 4:54 am
Posts: 4
Can anyone help me how to find out what layer-id a certain layer of my map has?

In tiled i cannot see things like layerid or tileid.

And whats the meaning of tile-id ? if i have 100 tiles in a layer. How can i make out what image is at what place?
( i can print the ids but if i get id 769 i still dont know if thats the red tile i am looking for)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 23, 2011 6:45 pm 
Offline
Game Developer
User avatar

Joined: Wed Feb 17, 2010 12:24 am
Posts: 598
There is also a "getImage" method.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 23, 2011 7:11 pm 
Offline

Joined: Fri Jan 21, 2011 4:54 am
Posts: 4
Yes thats works fine in my case.

Well i just found slick and tiled and never used it before ^^

Can anyone tell me whats the difference between tile-layer and object-layer?

What if i wanna do some boulder-dash or pacman clone.
Should the pacmansprite be in the map? or the diamonds? or ghosts?

Or should i only do the map itself with tiled and render "objects" separately?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 24, 2011 5:37 pm 
Offline
Game Developer
User avatar

Joined: Wed Feb 17, 2010 12:24 am
Posts: 598
>> Can anyone tell me whats the difference between tile-layer and object-layer?

Object layer are for objects; tiled layer is for tiles :)

Are you using the new QT version of Tiled Map Editor? If so, you can create an object layer and then add objects to it.

>> Should the pacmansprite be in the map? or the diamonds? or ghosts?

For pacman, I would make:

PacMan not part of the map, nor the ghosts. Those would be entity objects of some sorts.

Map walls and floor would be part of the tile layer.

Pellets/pills would be objects in the object layer.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 03, 2011 7:17 pm 
Offline

Joined: Mon Jul 21, 2008 2:34 pm
Posts: 11
dime wrote:
>> Should the pacmansprite be in the map? or the diamonds? or ghosts?

For pacman, I would make:

PacMan not part of the map, nor the ghosts. Those would be entity objects of some sorts.

Map walls and floor would be part of the tile layer.

Pellets/pills would be objects in the object layer.

It would also make sense to use objects to specify the starting positions of the ghosts/pacman, and maybe the locations where a fruit bonus can appear.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group