How do I Make Tiles Breakable Like In Terraria?

0 favourites
  • 5 posts
From the Asset Store
Do you need to break something? It’s okay, we’ve got you covered. No damage, danger or clean-up needed!
  • I am working on a terraria-like game and I don't know how to make the tiles breakable with the tile being animated with cracks growing, what is the easiest way of doing this?

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I am working on a terraria-like game and I don't know how to make the tiles breakable with the tile being animated with cracks growing, what is the easiest way of doing this?

    I am not sure about animations on tilemaps, but when i did such a game i made blocks using sprites with animations, 1 frame has the block, 1 frame has the block slightly damaged, last frame has it more damaged etc. I set the animation speed to 0 and i just switch frames from 0 to 1 on collision.

  • I am not sure about animations on tilemaps, but when i did such a game i made blocks using sprites with animations, 1 frame has the block, 1 frame has the block slightly damaged, last frame has it more damaged etc. I set the animation speed to 0 and i just switch frames from 0 to 1 on collision.

    wouldnt having so many sprites lag out the game?

  • You could have more than one tilemap stacked on top of each other, each one would be a different tile state, like normal, cracked etc, but only make that specific tile visible when needed, make its other states in the stack invisible.

    Or else use one tilemap for the normal state, then when it gets cracked make that tile invisible and create a sprite for that tile in its place, that way only damaged tiles are sprites?

  • > I am not sure about animations on tilemaps, but when i did such a game i made blocks using sprites with animations, 1 frame has the block, 1 frame has the block slightly damaged, last frame has it more damaged etc. I set the animation speed to 0 and i just switch frames from 0 to 1 on collision.

    wouldnt having so many sprites lag out the game?

    Depends on if all of the blocks should be breakable, if so, then yes would be to much, but you can use multiple tilemaps aswell, not sure how to fit in animations tho, but you can change a tile to another cracked tile on hit, then destroy tile.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)