Swap file of same filenames in multiple directories will collide or not

If I create same file names like A.cpp b.cpp C.cpp D.cpp in multiple directories
and forget to save it, by default swap file is created.

I have also added this in my init.vim

set backupdir=~/Desktop/cp/vimtmp//
set directory=~/Desktop/cp/vimtmp//
set undodir=~/Desktop/cp/vimtmp//

Will the swap files of same names in different directory collide ever?

Yes.
The reasening is that swap files the file path wher / are replaced by %.
An example of where same named files collide:

a%/b/file.txt
a/%b/file.txt

It is also posible to have non same named files collide:

a%file.txt
a/file.txt

The general rule is that as long files do not contain % then no collision will happen.