0 Favourites

Destroy a tile for tilemap

  • Here you go....

    I added a delete tile with a function to convert layout position info to a tile position. I also moved the origin of the bullet so that it would overlap the tilemap tile when the collision polygon made contact with the tile (the conversion takes the coordinate of the bullet and if the origin is not overlapping the tile even though the bullet and tile are in collision, no tile deletion would take place). Not perfect but an easy work-around.

  • Tks Colludium,

    So what would be the right way to do? I am looking for a right way to make tile style games . Before, I duplicated several sprites around the layout and I think it made the game lag. I hope it can decrease the use of processing. It is a good way for solve this?

  • I'm not a fan of tilemaps, but that's just my style of game creation (and you should also note that I'm a full-up amateur here - this is a bit of fun/hobby for me rather than a means of making a living). I prefer to use sprites and tiled backgrounds because they scale better than the tilemap object. However, from what I've read on the forum, the tilemap is a very efficient way of drawing lots of images (the problem for me is it produces visible seams unless you do not use pixel rounding and you do use integer scaling). If you are happy to work around those limitations then I think it's your best option - and from the sounds of your description of using lots of sprites - it might just well be. It's also worth considering that C2 optimizes its collision checking so that (not so effective on mobile) lots of objects shouldn't impact on your game's performance too much. If any of your sprites are large, however, you also run the risk of running out of memory. Hope this helps?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Yes, thank y o u alot, colludium. This explanation helps me so much.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
105 16,954
Magistross's avatar
Magistross
Unread hot topic
39 1,423
Zebbi's avatar
Zebbi
Unread hot topic
73 32,050
shubhamrathi9's avatar
shubhamrathi9