Here's the capx showing my issue ... Capx
I have a tiled background, 256x256, which I'm positioning relative to the player's 'map' location (the player is held steady in the exact centre of the screen and everything revolves around him). So to find the location of the tiled background, I use a 'mod 256' calculation.
Then to find the location of enemy ships (which are also placed relative to the player at the centre of the screen), I just need the relative placement, e.g Enemy.X = Player.X + (Enemy.MapX-Player.MapX).
As pointed out below, the enemies are the light blue blocks.
Both calculations are 'correct' (I think) but it leaves a strange effect where the enemies 'slide' against the background. I'm guessing this is because the enemy positions aren't integers and the tiled background is set to exact integers because of the mod function.
Any ideas on how to correct this? Is there a way I could position the scrolling background more accurately without using mod?