I am trying to develop a game as my major project using Java.
I have to move a coin like object on a board (it's a board game), I want to know how to move that object in any direction and how to implement 2-D collision on that objects (I have implemented collision detection.)
Until now objects move in straight lines with slope=1
, pathFinder(int x1, int y1, int slope);
(the method to move objects) will have current position(x1, y1) and slope as input, so how to move object in any direction and at any slope? Moreover, how to implement velocity vectors in java, probably using a class Vector and defining all operations in it?