Page 1 of 1

Drunk as fuck

Posted: Fri Jan 22, 2010 9:32 pm
by Falco Girgis
So Kendall bought a bottle of chapmage, and I just had several beers. I've decided that it's time to sit the fuck down and dev for the day (afer playing Twilight Princess for quite awhile). Just thought that I should mention that the Elysian Shadows engiune is clearly being worked on. If you would like proof, here's my current fun ction I'm working on:

Code: Select all

const static int positionMaxIterations = 100;
	const static float penetrationEpsilon = 0.001f;
	Vector2 pointOfContact, velocityChange[2];
	float rotationAmount[2];
	float maxPenetration;
	int iterations = 0;
	int currentRigidBody = 0;
	int currentContact = 0;

	while(iterations < positionsMaxIterations) {
		maxPenetration = penetrationEpsilon;
		currentRigidBody = -1;

		for(unsigned int i = 0; i < currentLevel->currentArea->rigidBody.size(); ++i) {
			for(unsigned int j = 0; j < currentLevel->currentArea->rigidBody[i]->collisionContact.size(); ++j) {
				if(currentLevel->currentArea->rigidBody[i]->collisionContact[j].penetration > maxPenetration) {
					maxPenetration = currentLevel->currentArea->rigidBody[i]->collisionContact[j].penetration;
					currentRigidBody = i;
					currentContact = j;
				}
			}
		}
		if(currentRigidBody == -1) break;

		//MATCH AWAKE STATE?
		//c[index].matchAwakeState();

		currentLevel->currentArea->rigidBody[currentRigidBody]->collisionContact[currentContact].ApplyPositionChange(velocityChange, rotationAmount);

		for(unsigned int i = 0; i < currentLevel->currentArea->rigidBody.size(); ++i) {
			for(unsigned int j = 0; j < currentLevel->currentArea->rigidBody[i]->collisionContact.size(); ++j) {
				if(currentLevel->currentArea->rigidBody[i]->collisionContact[j].body[0] == currentLevel->currentArea->rigidBody[currentRigidBody]->collisionContact[currentContact].body[0]) {

				}
				else if(currentLevel->currentArea->rigidBody[i]->collisionContact[j].body[0] == currentLevel->currentArea->rigidBody[currentRigidBody]->collisionContact[currentContact].body[1]) {

				}

				if(currentLevel->currentArea->rigidBody[i]->collisionContact[j].body[1]) {
					if(currentLevel->currentArea->rigidBody[i]->collisionContact[j].body[1] == currentLevel->currentArea->rigidBody[currentRigidBody]->collisionContact[currentContact].body[0]) {

					}
					else if(currentLevel->currentArea->rigidBody[i]->collisionContact[j].body[1] == currentLevel->currentArea->rigidBody[currentRigidBody]->collisionContact[currentContact].body[1]) {

					}

				}
			}
		}
	}

I'm not disucussing what the code is or what I'm doing. I'll probably delete this topic when I sober up. =Also, I'm trying to get enough shit done so that I, personally, will be impressed with ESRev2. If I'm not impressedw ith my own work, you arent seeing it. :D

Re: Drunk as fuck

Posted: Fri Jan 22, 2010 9:56 pm
by Big Grizzle
LMFAO!!!

An unorthodox approach to coding. Nonetheless good luck!

Re: Drunk as fuck

Posted: Sat Jan 23, 2010 12:48 am
by hurstshifter
GyroVorbis wrote: I'll probably delete this topic when I sober up
THIS

lulz

Re: Drunk as fuck

Posted: Sat Jan 23, 2010 5:29 am
by Milch
You are not the only one.
I also code everytime I'm drunk :lol:

Re: Drunk as fuck

Posted: Sat Jan 23, 2010 6:09 pm
by short
I vote leave it

Re: Drunk as fuck

Posted: Sat Jan 23, 2010 7:33 pm
by Singleton
GyroVorbis wrote:I'll probably delete this topic when I sober up.
LOL
GyroVorbis wrote:=Also, I'm trying to get enough shit done so that I, personally, will be impressed with ESRev2. If I'm not impressedw ith my own work, you arent seeing it. :D
You really is a sadistic bastard lol

Re: Drunk as fuck

Posted: Sun Jan 24, 2010 7:47 am
by avansc
^, or just someone that wants to be proud of their work?

Re: Drunk as fuck

Posted: Sun Jan 24, 2010 11:05 am
by RyanPridgeon
Jesus, Mary and Joseph.

Re: Drunk as fuck

Posted: Tue Jan 26, 2010 4:49 pm
by trufun202
Damnit! I miss drunken coding. It's always fun to leave myself comments for the next day. ;)

Re: Drunk as fuck

Posted: Tue Jan 26, 2010 4:55 pm
by programmerinprogress
I tried to code drunk infront of friends once... the code didn't work but my friends were actually relatively impressed I could focus on keyboard still :lol:

Re: Drunk as fuck

Posted: Tue Jan 26, 2010 4:55 pm
by Lord Pingas
Shit, I got to try that. :shock:

Re: Drunk as fuck

Posted: Thu Jan 28, 2010 2:06 pm
by zeid
I'll probably delete this topic when I sober up.
... Am I to assume your still not sober. Good effort :)
I tried to code drunk infront of friends once... the code didn't work but my friends were actually relatively impressed I could focus on keyboard still
I once coded up something for a uni assignment absolutely shitfaced (1st year shannanigan). It was a fair amount of lines, and because I couldn't get it to compile I just kept typing. After falling off my chair because the damn room wouldn't hold still I decided that I wasn't going to be able to get it to work in that state. I came back to it the next day with a nasty hangover and was actually pretty impressed that my errors were a couple of missing semi-colans, and an inability to spell things the same twice, but somehow my logic and syntax was perfect. I made a few little corrections and saved myself an afternoon of coding headaches... Substituted with a real headache.

This bizzare anomily is not undocumented; Ballmer Peak

But remember kids, coding drunk is bad, falling off your chair hurts and no one likes waking up to find out they did something they would regret... Like posting on a forum about how drunk you are :P

Re: Drunk as fuck

Posted: Fri Jan 29, 2010 2:07 am
by Innerscope
zeid wrote: This bizzare anomily is not undocumented; Ballmer Peak

But remember kids, coding drunk is bad, falling off your chair hurts and no one likes waking up to find out they did something they would regret... Like posting on a forum about how drunk you are :P
Oh yes, a blood alcohol concentration level of .1337% that's about a six pack of beer. :)

Re: Drunk as fuck

Posted: Wed Feb 03, 2010 11:36 pm
by eatcomics
Now you see there's a curve to this... ok, so there is a specific point at which one's BAC is perfect for coding... So you can't just give a programming team a year's worth of beer and say get to coding... You have to control the experiment. But alcohol can be good for coding :D

Re: Drunk as fuck

Posted: Mon Feb 22, 2010 1:39 pm
by MrDeathNote
Drunk coding is such a bad idea. I've tried it quite a few times because i keep convincing myself that ill do a better job than the time before, never really works out. I always wake up, look at my code and wonder how a retarded chimp got into my room and danced all over my keyboard because thats the only way my code got that fucked.