top | item 43197967

(no title)

stnmtn | 1 year ago

This one made me laugh, mostly because the variable names are so dumb

// our RNG is basically shit -- horribly nonrandom at the start of the sequence.

// get a few values at random to get rid of the dreck.

// there's no mathematical basis for this, but empirically, it helps a lot.

UnsignedInt silly = GetGameLogicRandomSeed() % 7;

for (Int poo = 0; poo < silly; ++poo)

{

GameLogicRandomValue(0, 1); // ignore result

}

discuss

order

anal_reactor|1 year ago

I spent some time browing curiosities about old games, and what strikes me is that the code sometimes was quite personal. You could see the joy, the anger, the disappointment, the satisfaction. Nowadays it would never fly to name a variable "poo", you need to stay professional at all times.

qingcharles|1 year ago

I was a game dev in the mid 90s. It was unserious. There was all sorts of crazy shit in the graphics assets. One wall I remember says "CUNT" on it o_O

I'm sad if developers can no longer name their variables poo and fuck.

Also teenage me would probably be horrified finding out 30 years later his source code was public.

mschuster91|1 year ago

> Nowadays it would never fly to name a variable "poo", you need to stay professional at all times.

I couldn't help but chuckle at your user name when reading this comment

hasley|1 year ago

Still today, I tend to increase my motivation of writing unit tests by using some non-serious names and strings in the tests.

recursive|1 year ago

Probably depends how indie/small your studio is.

herewulf|1 year ago

Nowadays it just depends on how shitty your job is.

yobbo|1 year ago

This is similar to "burn-in" for markov-chain montecarlo. When the chain is initialized to some bad value, it requires a number of iterations to get into a "good chain". But for a uniform RNG, any value should be good.

So the RNG doesn't seem great.