How do I change the properties of a tile efficiently?

0 favourites
  • 5 posts
From the Asset Store
Each tile 64 by 64 pixels - Ultimate Tile Set for your awesome games
  • Hello all.

    I am trying to develop a game mechanic. When you use your frost ability on a tile, it will change its appearance to be frozen and change the physics when you walk over it.

    Using a tile map doesn't seem to be the best route as you cannot add behaviors so I should be creating these tiles as sprites? The problem is, I would need to create each tile as a separate object then and this could get very overwhelming.

    What's the best practice or best way to do this? I would appreciate any guidance. Thank you

  • There is no easy solution. You can spawn invisible sprites on top of frozen tiles with different physics parameters. Or you can check which tile the character is overlapping and change physics setting in real time depending on tile type.

  • Thank you dop for taking the time to respond and help so many in this community.

    I am trying to understand the logic flow here. Would I have a function, which checks whether its been collided with the specific ice particle or whatever. If so then change it appearance and settings or have an invisible sprite go over it?

    I will try to prototype tonight, thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, I don't know your game. I assume there is a tilemap? Like I said, these are two different approaches:

    1. Create invisible sprites on frozen tiles with the required physics properties.

    2. On every tick compare the tile under the character. If it's frozen - temporarily change the properties of the tilemap or behavior. We do this in our game - when walking on ice tiles, 8direction deceleration is reduced, so the character is sliding.

  • Well, I don't know your game. I assume there is a tilemap? Like I said, these are two different approaches:

    1. Create invisible sprites on frozen tiles with the required physics properties.

    2. On every tick compare the tile under the character. If it's frozen - temporarily change the properties of the tilemap or behavior. We do this in our game - when walking on ice tiles, 8direction deceleration is reduced, so the character is sliding.

    Just wanted to say Moonstone island looks really cool and its inspiring! Any advice for a dev starting his journey?

    I found a solution and wanted to share it here in case anyone else needs it. I discovered "Families" are a way to group similar objects together and you can add behaviors and conditions to them so I did that for the floors. Then the simple condition of whether the bullet collides with them. I was able to get some effects working, but I couldn't get the sliding effect when walking on it.

    I tried to reduce friction and increase acceleration. Both objects had the Physics attached to them as well. The mechanic is working which is the point.

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