Grid-Based movement using the Tilemap object for collisions.

Attached Files

The following files have been attached to this tutorial:

.capx

grid-based-movement.capx

Download now 177.37 KB

Stats

4,405 visits, 7,009 views

Tools

Here's an example of grid-based movement with C2's tilemap object. Using a tilemap layer for collision checks makes it really easy to work with the grid. C2 gives you the ability to check and change a tile at certain coordinates. This can be used to create a level editor, but also to work with grid-based movement.

You'll find detailed comments in the capx file to guide you through the code. It shows how to have a character that moves fluidly on the board, with collison data handled and updated on a Tilemap object.

And if you're interested, this video explains grid-based movement/collisions from a game design standpoint:

.CAPX

grid-based-movement.capx

Download now 177.37 KB
  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!