i'm not sure if it'll solve the problem but you should have the camera updating its position after the player has moved, it may/should make it a little smoother

other than that i can't see what's wrong unless you've given that player_code to 2 entities... or someone in your computer really doesn't like you smirk