Thanks! The distortion effect is done by not refreshing the whole screen, and only paint some tiles randomly in every frame.
The enemies are always drawn, but the trail they leave is only cleared when another map tile is finally painted on top of it.