I have two questions but they are fairly related so I figured one post would be enough.
Below is an image of the game I am working on. As you can see I have a blue grid and some green obstacles. I would like to have some yellow pawns which can navigate one square at a time.
- how would I move a box shape from 1,2,1 to 1,2,2?
I am looking for a way of doing this so that it looks fluid (like a gradual movement to the next position). Using a local translation just teleports it my box there. Also, I’m working with in a method move that belongs to Class pawn.
- what is the most efficient way to check to see if the spot where your moving to is already filled by some other object?
my initial idea was to implement an array that will keep track of all the objects and their locations and then check those arrays each time a move is made to see if its a legal move.