ramones , i have tried but the weird thing is that has the same problem .
but i have tried to just write like this : my window width /2 , my window hight /2 so in action like this : 640/2 , 480/2 and its worked just fine but the problem in this : it need to re-fix in every windows so for every mobile if the game for mobiles .
the weird thing as i mentioned before is that when i write it like this : windowwidth/2, windowhight/2 it really doesn't do the job i have no idea why o.o ..
while i'm writing this post i have re-tried and put some text to see where is problem and i found that the window size change so thats why it keep getting new positions , also when i tried yours i always get sprite on 0,0 i don't know why ...
anyother thing can fix this??