I worked out a very rough code block for this some time ago, i don’t have the code but the general idea was like this:
Make the player coordinates final, put him in the middle of the screen, then load up a 2D array of tiles, give them relative coordinates, coordinates that is changeable that is. When the player moves, instead of adding velocity to the player, add it to the tiles so that they move. Each update you loop through the tiles within view of the player in a nested for loop to update their current position with the
position X = velocity X * elapsed time
Position Y = velocity Y * elapsed time
Rough sketch, but i hope this helps you a bit at least