Hello Guest

Author Topic: Tile Map Autotiling  (Read 3127 times)

IndyBonez

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Tile Map Autotiling
« on: April 23, 2015, 09:17:08 pm »
Hi,

We are looking to implement auto tiling on top of the tile map stuff in 2D toolkit.

We are currently importing TMX maps from the Tiled Map Editor and using auto-tiling in there.

What we also want to support is auto tiling when painting in the 2D Toolkit editor and also auto tiling when modifying the map at run-time (ie mining).

But we are not sure as to where we should be looking within the 2D toolkits source code to implement these features? If you could possibly point us in the right direction that would be great. For example look at file x at line n type suggestions.

Thank you

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tile Map Autotiling
« Reply #1 on: April 28, 2015, 03:13:15 pm »
Quote
What we also want to support is auto tiling when painting in the 2D Toolkit editor and also auto tiling when modifying the map at run-time (ie mining).
You can modify the tilemap quite easily - tilemap.SetTile(x, y, tileId);

If you're modifying the tilemap at runtime, make sure you're not using physics - its really expensive to regenerate that at runtime. You should either impleemtn your own physics, or recycle physics boxes around the player.