Solved Remove bullets when off the screen

Hey guys, I’ll make this quick as I’m in College but my brain got side tracked into programming :stuck_out_tongue:

I’m wondering what the best way is to remove bullets from my new game when they go off the screen? I have them setup for collisions with entity’s but now I need to solve this.

My first though was something with the camera but now I am thinking about making a line of rectangles (invisible of course) that move at the same speed as the player at each update and will be just above the edge of the screen. If the bullets collide with the rectangles then they are removed. Thoughts?

EDIT: Totally forgot to add this… The game is a vertical scrolling game, so the player is moving up the screen. Just to clear up any confusion :slight_smile: