Now what I have is that when some enemy hits the wall I change direction of enemy movement. So it basically looks like they bounce from the wall in opposite direction. However sometimes (not really often) collision just does not work and enemies continue moving im the same direction which means they go out of the screen. I dont get it. Does anyone know what could be wrong please?
elsewhere in the code I also have something like: every 5 seconds add 50 to current speed. So after a while enemies moves faster and faster. Could this be the cause?