Someone might be misled into thinking that the color change has some effect on how the collision detection works, thinking that because the background and wall are the same color, the collision detection must not work anymore. But this is not the case, the game logic is actually checking that the dot is changing the wall color in order to disable collision for the wall.
The game makes no attempt at all to re-use a sprite slot for another sprite appearing further down the screen. It's just two sprites, then no more.
The game also uses the hardware's pixel-level collision detection to check for collisions rather than bounding boxes, so when the sprites are flickering, they cannot collide with the player. But collision detection is not the only way that objects can interact, there's also the Bat and Magnet, or the dragons having objects to guard/run away from. The bridge also makes the game ignore player collisions for a particular bounding box inside the bridge.
staplung•1h ago
https://www.youtube.com/watch?v=rNK44eqvP38
And of course, the "someone get this freakin duck away from me!"
https://www.youtube.com/watch?v=OOQDtZg0sCo