A week ago I "fired" my level designer because I'm having to completely rewrite the engine for Chronicles of the Hchrubak, which will take quite some time.
The code was becoming a jumbled mess and I was basically having to overhaul the game anyway.So, I began with a new movement and collision checking engine that uses almost exclusively while loops with lengthdir_x and _y. All was good, and it's a little hard to explain, but there was a large bug within the code after only a few days.I retyped much of it and checked my logic several times through. After TWO @$*#$!# DAYS the code was almost completely alien from its original form, even though it was now several times more efficient.So, tonight, just as I was considering rage-quitting and finding some small animals to crush, I check my problematic code one more time and I was using a "<" rather than an ">"!!!!RAGE!
I was almost sure this was going to be about 64digits' mind altering code.
:\
I was almost sure this was going to be about 64digits' mind altering code
That doesn't make sense, the title is "stupid code…" O.oReverse psychology mind-altering code.
That's happened plenty of times to me, Darth :P I hate finding out all of my work was thrown off by one little symbol or a mistyped variable.
Using almost exclusively while loops is now a feature?
I'm used to seeing my code transform as I go back and clean stuff up. Sometimes I'm wondering what I was thinking…
My most common mistake (and a very stupid one) along those lines is forgetting function calls. I'll write a bunch of flawless functions, run it, and wonder why it's not working only to realize I forgot to call one or more functions somewhere.
God, compiler, the functions are there, I have to tell you when to call them, too? D:Never, ever assume that taking the address of a function will always return the same location in memory.
Also never needlessly export or attempt to import template inline'd functions.I've also been able to crash the VC++ compiler many times, and have succeeded in exposing various compiler bugs relating to its inability to properly deal with virtual inheritance.I also have a bad habit of calling virtual functions that either don't exist yet or no longer exist.I also panic about performance issues after I forget that I have my "give CPU cycles back to system" turned on.Half my errors are caused by me misusing my own code rather then it doing anything wrong.