how do i make a top view game

all i really need to now is when i make the player move it will slide in the direction you make it go how do i fix that

There is already a discussion about this and it’s pretty recent:

Grazer: "here’s an example of grid-based movement with collision detection, and the logic is super simple: "

Here’s another example, except it’s not grid-based: