{"author_name":"Demian.J","cat":"LD #24","comments":[],"epoch":1345983840,"likes":3,"metadata":{"p_key":"52612","p_author":"Demian.J","p_authorkey":"505377","p_urlkey":"88314","p_title":"Trial and Error or: The story of how I hunted a fatal bug that wasn\u2019t one","p_cat":"LD #24","p_event":"LD24","p_time":"1345983840","p_likes":"3","p_comments":"0","p_status":"UPD5","us_key":"505377","us_name":"Demian.J","us_username":"Demian.J","event_start":"1345766400","event_key":"12","event_name":"LD24"},"text":"<p>After 5 hours of fixing a none existant bug I have finally found the bug that bugged up my movement code. I search my code countless times and revised and cleaned it entirly. No reason for the bug inside. After using the console for debugging I found that pygames collision detection only worked every third frame. \u00a0Some other image related modules messed up as well. I could not find a solution to this, so after all those hours I finally decided to move on and be able to release at least something, be it buggy or not. I finally added the time related events and as soon as I wrote the last character of Clock() it stuck me like a lightning. NO WAY o_o ! Could it Be O_O?! \u00a0I set the framerate to 60 and started the programm. EVERYTHING WORKED FINE! I just wasted 5 hours on a non existing bug, revising and rewriting all of the 400 lines I already had. Added 20 lines here, 20 lines there and removed them again because they fixed nothing.<\/p>\n <p>But at the \u00a0same time I was really happy to have found the bug. It all had its upsides as well. My codebase is now perfectly tidy, dense and clean.<\/p>\n <p>I will post some pics as soon as the first part of the gameplay is finished.<\/p>\n <p>Good luck to all of you, especially to all the others struggeling with bugs \ud83d\ude09<\/p>","time":"August 26th, 2012 7:24 am","title":"Trial and Error or: The story of how I hunted a fatal bug that wasn\u2019t one"}