I am trying to create an Android Game and I am facing my first big problem.
After reading blogs, tutos ... I am able to easily move a character with a drag and drop, make it move move to a touched area, but I am unable to move it on a straight line with a finger gesture !
Here's a quick explanation of my problem
I want the character to move on a virtual grid, only up down left right, on a straight line and until it uncounter a wall. If there is nothing on his path, he is unstopped and "fall" from the screen !
He can only move from center of a square to the center on the square he is stopped on. This mean that when he hits a wall, he bounce and go back to the center of the previous square.
For complement :
- It will be a sliding movement
- The wall is just a term, in fact it will be objects ( let say fruits, animals ... ), with different size in a square with the same size that all the other squares.
- I want to movement to be fluid over the tiles, not moving from tiles to tiles with a stop every time.
I am on that movement since weeks and can afford to find a solution, so your help is really welcome !
Thank you very much.