Problem from that comes when there are obstacles on map you don't want the moving sprite to pass through. So it is easier like this and check bg data before writing the move string with bttn input so it prevents target from hitting obstacle and therefore the moving sprite will avoid it