Tile movement?

0 favourites
From the Asset Store
slide the tiles to fill the board.60 awesome levels.
  • Is it possible to use tile movement in C2?

  • What is tile movement ?

    I'm not sure, but this might help you.

  • This is tile movement.

  • Well be more specific about what you are willing to do.

    As it, it has little meaning.

    Do you want to "teleport" your sprite from a tile to another ?

    Do you want to see it actually move ?

    Will you use keyboard ? Mouse ?

    There are several topics already about making a sprite move.

    This one shows a lot of possibilities, and switching from mouse to keyboard is a good learning exercise.

  • Yeah I would like for the character to "teleport" using WASD from one tile to another so you get the illusion of it walking around..

  • QuickGridMovement.capx

    This is one implementation, just to give you the idea.

    Also I didn't use WASD as I have an AZERTY keyboard, and WASD is truely a pain with it.

    Nothing beats the arrow and always think about internationalization of your application if you want to hit a large audience.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • WOW THIS IS AWESOME! Exactly what I was looking for...except wow I have no idea how you made that.

  • On start of layout (event1) I make the grid (thanks to the two loops "ColsLoop" and "RowsLoop").

    From event5 it is just the keyboard control, making sure that when you hit a keyboard, moving the player won't take you out of the layout.

    Moving the player is changing its X or Y component by its width or height (since the player is the same size as the grid cells).

    In this implementation, the grid is purely visual, we have no interaction with it.

  • Hmm so..instead of randomizing the grid is there a way to draw the grid out?

  • Put a single frame in the animation (a frame of a cell).

    Delete the "set animation frame" line (since it is not required).

    Like I did for the example of the PathFinder behavior.

  • When I try that it messes up the movement...I'm going to try something else and post it shortly.

  • You have to make sure that your cell's image is 32X32 pixel.

    Or, if you want to modify the size of the cell (sprite) be sure to put the same size to "Player".

    It also helps to stick to power of 2 measures.


    The movement works, but hard to figure since there is no visual "refering".

    Try to bash an arrow key, at some point you will have the impression it is not moving, and then reach an edge.

  • lol thanks so much for helping me with this. I'm trying to get my own version to work here. The movement is the hardest part.

  • Hi Im new to C2 and I found your example very interesting. But I was wondering how to implement the same grid-like movement but you can see the player move between each square rather than teleport.

    I want to implement my game so that the player sprite is shown moving between two adjacent tiles with a duration of half a second.


  • Like I did for the example of the PathFinder behavior.

    This is awesome!   <img src="smileys/smiley1.gif" border="0" align="middle">

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