2D Toolkit Forum

2D Toolkit => Support => Topic started by: micky on September 17, 2013, 05:03:03 am

Title: tilemap surface properties
Post by: micky on September 17, 2013, 05:03:03 am
What would be the best way for some tiles to have properties? Like for example.. a level of friction or a skill level for a character for performing actions.. would I end up adding a bunch of trigger for this or is there a way to do this with the tile map editor?
Title: Re: tilemap surface properties
Post by: profanicus on September 17, 2013, 06:00:15 am
Each tile type can have data attached to it - string, int and float. You can use these to represent whatever you want.

Set their values in the tilemap editor (Data tab) and when the character is over a tile read in the appropriate value using GetTileInfoForTileId and act accordingly.
Title: Re: tilemap surface properties
Post by: Kalagaraz on September 17, 2013, 02:01:06 pm
Each tile type can have data attached to it - string, int and float. You can use these to represent whatever you want.

Set their values in the tilemap editor (Data tab) and when the character is over a tile read in the appropriate value using GetTileInfoForTileId and act accordingly.

Would be nice if we could do Per tile though, not per tile type. You can kind of hack it though by putting multiple of the same tile in the collection...
Title: Re: tilemap surface properties
Post by: unikronsoftware on September 17, 2013, 02:05:55 pm
The reason it isn't per tile is the overhead. The system is built to scale to really large tile maps, and this sorta thing adds fairly significant overheads to the whole thing. You can still use prefabs and tweak values per prefab if you don't need to modify too many tiles though....
Title: Re: tilemap surface properties
Post by: Kalagaraz on September 17, 2013, 02:38:51 pm
The reason it isn't per tile is the overhead. The system is built to scale to really large tile maps, and this sorta thing adds fairly significant overheads to the whole thing. You can still use prefabs and tweak values per prefab if you don't need to modify too many tiles though....

Can't do something like "Tiled" which has an object layer? You can make objects of arbitrary size, and set a "type" which you can interpret however.

(http://s21.postimg.org/slmjs2qc7/Objects.png)


Not that I'm in a hurry to have this as a feature or anything, just would be a nice feature I think.
Title: Re: tilemap surface properties
Post by: unikronsoftware on September 17, 2013, 04:10:50 pm
Yes, something like that was planned, but there is not ETA for this just yet.