Best way to create sliding tile game

  • Hi guys,

    I'm new to Haxe and HaxeFlixel. I've managed to create a tiled game-board using Tilemap. However, the central mechanic of my game involves swiping rows of tiles to move them horizontally or vertically. As tiles go off one end of the game-board, they reappear on the other side. (a swipe can move more than one tile over at a time). A single tap will move the players character to a new spot on the map. I'm planning on using the built-in Flixel pathfinding for this.

    But my main question is, What kind of objects should the game-board tiles be? Tiles? Sprites? Something else? How can I store them in a 2D array and let the use move them by touch.

    I'm not expecting anyone to code my game for me, I just need a few pointers in the right direction.

    I've made this diagram to visually explain how the sliding mechanic works.
    alt text
    alt text

  • You can first use a tilemap and then convert the tiles to FlxSprite by using FlxTilemap::tileToSprite

Log in to reply

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.