[SUGESSTION] Animated Tiles in Tilemap

0 favourites
From the Asset Store
40 Seamless textures for tile backgrounds. High resolution 1024x1024!
  • I think animated tiles is quite possible when if we have 3 tiles of 32x32 as 3 frames in horizontal, then use Tile X offset on specificed index of tiles in runtime.

    Is possible?

  • Since we can set collision on each tile now, it would be neat to enable animation to them aswell.

    Eather way, iam for animated tiles :D

  • Well seeing how the tilemap object spawns a bunch of tiledBG and other objects for placement of tiles while ripping from a tilesheet, I don't think it wouldn't be too hard to impliment

    I know some people have used "Load from URL" on "TiledBG" to make it emulate being animated. If we use this then the object would have to have a behavior that animated only certain tiles. There could be instance variables that determine which tiles animate and have their frames progress at a fixed interval to the end, and start over from the beginning. (Although with the introduction of tile-collisionboxes, probably up to the user to make sure all tiles have the hitbox they want it to have)

    Would probably be tricky to code it and have it check for it, or even use unnecessary processing power even though you may not use the animation feature. (if that is the case, an option to enable animations in the object properties)

  • Why you guys need it animated? For stuff like water I'm guessing? Well here's a technique I was using back in my rpgmaker days. Lets say we're making water. So First I would draw the ground around it. Stuff for water I would leave transparent. Then I would use 3 or more layers of background image, each with bit different water texture, and for each I would set transparency ( up to your own preferences). Also I would use eraser brush to make it bit more transparent in some places. The last texture would be the bottom of the lake that I would keep solid. Then you put them all together, and in construct you could use that technique of looped tiled background, for each of the water textures to move in different direction. Effect is really cool. You can also add sky reflection to it etc.

    EDIT@ Simple one that would imitate oldschool animated tileset would be to make several Tiled Backgrounds, each with different animation frame, call them something like Water1, Water2, Water3 etc, place Water1 backgrounds where you want them to be, and then make animation with events.

    EDIT2 Example of oldschool water. WATER.CAPX

  • +1 on this. Say we have an area in the tileset that shows a set of water frames. Then you Select an Animation Marque tool to click and drag an area of tiles, to form the animation. Taking the first tile from the 0,0 position of the animation marque, to drop on the map.

  • megatronx

    I've tried this method before but I don't trust multiple tiled backgrounds for some reasons, too much explain about the practices and performance, but this is ideal workaround if Ashley will say Tilemap doesn't use requestAnimationFrame. Why shouldn't we use only ONE OBJECT as one tilemap?

    This tilemap, represents animated water in bottom.


    Offset antimation to targeted tiles would work, we have no actions like Offset in runtime.

  • If I remember correctly Offset is not supported in html5 that's why you can't set offset to Tiled Backgrounds. Thought That was some time ago and maybe things had changed. I haven't tried the tileset object yet. Why not to try replacing it like i did with water? You can possibly save tiles positions as json, then load that json to other two tilemaps, and switch them every second. Since tilemaps are fairly small it shouldn't have much impact on performance.

    EDIT@ Also keep in mind that on running the game tiles are changed in to Tiled Backgrounds.

  • megatronx I literally talk about "offset" method which is not true offset function. It's just a theory.

    Basically, look it's possible to be animated in some coordenates of tiles, not the full by one object.


  • Can't check it out as not using 151 yet.

  • Actually another way is to do the coding yourself, and have your events check tile numbers for each tile

    If tilenumber=4 then wait 1sec and set tilenumber at tilelocation to 5

    and etc,

  • megatronx won't you download r151?

    Thndr I already posted a .capx it represents your idea

  • I won't because it seams to have problems with json, which I'm using a lot.

  • megatronx



    It's only 2 events and one tile map object

  • I see. But if its two events, is it really so bothersome? :) How is it done?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <img src="http://i.imgur.com/pw9fJyK.png" border="0" />

    megatronx the actions are based from the references about the coordenates of tiles, that's why we need something special to make animated tiles without the reference it could save our time.

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