just got my email for the say no tee , swag bitch <| sep |> If you compare them right after the code you just showed , then of course they will have the same hash . Also , you only need one surface . When initializing the surface surf surfacecreatewidth , height Here maybe clear the surface once buffer buffercreateX , buffergrow , 1 Should be 1 for strings buffergetsurfacebuffer , surf , 0 , 0 , 0 hashsurf buffermd 5 buffer , 0 , buffergetsizebufferNow this hash needs to be saved because it represents your empty surface . Once your surface has changed e . g . by drawing a sprite to it then its new hash will be different . For this to work it is important that you restore the original color values and especially alpha values when you delete pixels from the surface . Otherwise it will never be the original surface again and your check would be useless .