Take a look when you’ve had some sleep; I think you might be able to figure it out. Sorry I won’t be analyzing your code or game, but here are some hints on the camera:
The Camera represents where the person who is playing the game is. When that person moves, the things in the game world don’t. When the things in the game world move, the person playing does not. But, when you move, it looks like everything else does, because they are being “drawn” through your eyes and in your brain based both on where they are and where you are. So, when we draw something in the game, we should draw it based both on where it is and where the human player is. Thus, g.drawImage(cheapAnimation(), x - Camera.getX(), y - Camera.getY(), width, height, null); . The x and y are where the thing is, and the Camera.getX() and Camera.getY() are where the human player is looking from.
Your Tile.render() should draw its image with its x and y minus the Camera’s x and y. This way, if the camera moves to the right, the level gets drawn to the left, for example, making it look like your view has moved to the right.
Anything else that should be part of the game world – Player, NPC, whatever – should also draw its images minus the Camera’s x and y.
Anything that should be part of the HUD, rather than the game world, such as menus, should not draw minus the Camera’s x and y. This way, even if the Camera moves, the menus and stuff will stay in the same spot on the screen.
The principle here is that when something moves (changes its x and y position), that means that it has moved around in the game world. The Player and the Tiles don’t move when the Camera does. They stay in the same spot. But, when the Camera moves, while their x and y stay the same, they get drawn with an offset based on where the Camera is. This way, if you move your Camera, you don’t have to move all your Players and Tiles, but it’s like the person playing the game moves around instead.