Image showing rectangles used for collisions.
I am making an arcade-style game which involves moving an on-screen sprite. Since the in-game walls are part of the background image I have set up rectangles in order to test when a sprite collides with a wall (to block it from moving through for example). However I would like to know if there is a way to make the rectangles invisible or not viewable by the player (but still using them for collisions). I have just used the pygame.draw.rect() function to create the rectangles:
zone1rect = pygame.draw.rect(SURF, (0,0,0), (200, 418, 52, 188), 1)
EDIT: would it be possible to create a surface under the main one to add these to? And if so would this still allow collision between the sprite (which is on a different surface)? I am not asking about aloha colours, so please do not assosciate this with another question. Also that question talks about partly transparent rectangles, not what I want to know.