Skip to main content
Post Made Community Wiki by House
Source Link

[meant to be left as a comment to anon's answer, which was deleted as I posted it. He mentioned that he had all this functionality working, then split the single file code into multiple files, only for everything to fall apart]

Re: refactoring, stuff can happen, even to pros. Sometimes even with good tools like Git, a merge can fail so instead of feature A and feature B both working, neither work! The only choice is to go back to A and try again. Luckily version control will save this code for you; if you don't use real version control, at least do it manually by zipping your dev folder regularly -- HD space is cheap! In conclusion, go back to what works and refactor in smaller steps, making sure the game still works at each step. It is really depressing to clean up code only to see everything fall apart. Just revert to old code.