1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to find the ideal path done inside a given shape in LibGDX?

Discussion in 'Programming/Internet' started by cube888, Oct 8, 2018.

Tags: Add Tags
  1. cube888

    cube888 Guest

    I'm trying to make an android/libgdx game in which for every level you have a different shape as a png, and you have to drag your finger inside the shape and try to be as close as the ideal path created after the shape. At the end of the level the game will show you in a percentage how close you were from the ideal path.

    My question is how can I find the ideal way that the player has to follow? Is there any function that i can use to find out the array of points created after the shape?

    My problem is that the shape width is different along the way, so I can't use the pixels path. I already have an algorithm which gives me the array of points from the path of the player so I have to compare it with the ideal one.

    If you have any ideas of any algorithm or functions that can help please let me know. Any answer will be helpful. [​IMG]

    Login To add answer/comment

Share This Page