I am curious, how can one implement something like this: https://www.youtube.com/watch?v=htoqZuOQUm8. The cube roll is probably an animation, but to me, it looks a lot like the movement is “quantized” on an invisible grid. I am interested on that kind of movement.
Pseudo-code:
void Update()
{
if(ArrowKeyUp.IsPressed())
{
transform.MoveUpInGrid();
}
if(ArrowKeyDown.IsPressed()
{
transform.MoveDownInGrid();
}
//Same for left and right.
}
I usually code in C#, so I’d prefer any help you provide to be in C#.
Thanks in advance! 
I can think of a ton of ways to do that.
Seeing it in action doesn’t reduce the number of ways I could think of doing it.
The primary goal is that every move has to consider error correction.
This can be done numerous ways.
-
the world is represented as a grid in memory, and the view is just a projection of that data. When you push a direction the current index moves inside that grid. And the view is updated to show that new position.
-
Every time one moves, the current location is calculated, and mapped to the known grid. A new position is calculated from that grid (mid point, corner point, whatever), and the cube is moved to that position (animating along the way).
-
Physics constraints are used to restrict movement to an invisible grid.
…
this list goes on.
Deciding the way to do it depends on other considerations. Some of them don’t expand very much. Say you wanted to later implement hills and the sort, especially those with paths under/over other paths. Well the grid would fail miserably at that.
This guy has an asset for grids. I asked him a ton of questions about it since I created a grid based game called Temple Racer and was thinking of sequels. I think his asset could most likely support the movement.
His profile.
http://forum.unity3d.com/members/28408-hiphish
His Asset.
http://forum.unity3d.com/threads/144886-Grid-Framework-scripting-and-editor-plugins
Cool stuff, but I’d like to make sure it works for me before I buy it.
@lordofduct
Number 3 sounds easier than the others, but what are physics constraints? BTW, no hills just planes, I want it to be as minimal as possible. 
He is pretty helpful. I would just ask, but from what I gathered from our discussions I think it would. You would have to handle the rotation, but movement to tile xy would be no problem.