Recently, I had a school project that involved making a simple game. It was my first opportunity in several months to write code that didn't have to adhere to strict specifications, and I took my newfound freedom too far.

My theme was "fish in space." The fish is looking for water to live in while avoiding jumping trash cans of poisonous water. Also, the game oscillates on a sine wave.

Since it was a school project, I can't post the full source code, because my professor might hunt me down and kill me. Here are a few samples, though!

The "I realize I don't know what I'm doing" disclaimer:

//probably better to use a transformation matrix or something
//rather than using a trig function on _every_ point. but 
//this works, and why i am even trying to do this in a 2d engine

The "I just tried typing random things until it worked, and then inserted a comment to make it look like I knew what I was doing" code:

for(double[] indent : indents) {
    extraZ-=0.3*(20-((Math.pow(indent[2]/20.0,2))*20.0))
    *Math.pow(2,-Math.pow((((Math.pow(x-indent[0],2)+
    Math.pow(y-indent[1],2))))/1000.0,2));
    //parabola for time, bell curve for distance
}