Adding collision to a screen scrolling game[Slick2D]

I’m using thenewboston tutorial on YouTube and learned how to make a game that scrolls like old style Zelda. Basically the player is still. Keypresses make the map move and I tried drawing rectangles to test collision but it stays in a certain place, moving with the screen. Can someone explain how to make a proper side scroller or any scrolling game with collision?