Hello Guest

Author Topic: tilemap surface properties  (Read 5497 times)

micky

  • Newbie
  • *
  • Posts: 23
    • View Profile
tilemap surface properties
« 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?

profanicus

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 167
    • View Profile
Re: tilemap surface properties
« Reply #1 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.

Kalagaraz

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: tilemap surface properties
« Reply #2 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...

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tilemap surface properties
« Reply #3 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....

Kalagaraz

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: tilemap surface properties
« Reply #4 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.




Not that I'm in a hurry to have this as a feature or anything, just would be a nice feature I think.
« Last Edit: September 17, 2013, 02:41:50 pm by Kalagaraz »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tilemap surface properties
« Reply #5 on: September 17, 2013, 04:10:50 pm »
Yes, something like that was planned, but there is not ETA for this just yet.