r/shittyprogramming • • Jun 16 '16

Reddit's definition for gamedev

http://imgur.com/mEmdqqe
255 Upvotes

20 comments sorted by

56

u/errorkode Jun 16 '16

Remember that 800+ line method for taking a step in some engine? I think it was crytek?

10

u/[deleted] Jun 16 '16

I want to see that. Anyone have a link to it?

24

u/sfiq12 Jun 16 '16

28

u/skunkreturns Jun 16 '16

oh my fuckin lord

5

u/AlGoreBestGore Jun 16 '16

My hand hurts just from scrolling through it.

2

u/TheQueefGoblin Jun 16 '16

Why? Seriously, why is all that necessary?

14

u/MaxPlay Jun 16 '16

Because it updates the physical behaviour of an object. It also prevents itself from taking to long by using gotos to step out of some loops. Actually it is pretty readable and makes sense when you go through it. My only problem with it are the ugly variable names.

10

u/Masked_Death Jun 24 '16

"ugly variable names"

le_precomp_entity; le_precomp_part; le_tmp_contact; le_contact

Fedora.Tip();
print("m'lady");

0

u/[deleted] Jun 16 '16

[deleted]

15

u/Niriel Jun 16 '16

Yeah. But we're talking about a hyper-optimized game engine here. Nobody would complain about readability if that bit were written in assembly, because we just don't expect assembly to be readable. Obviously, this code doesn't only work, but works brilliantly. I'm not knowledgeable enough to tell whether it's actually horrible, or necessary for cache-locality reasons or what not.

4

u/lewisj489 Jun 16 '16

What kind of step is this referring to?

11

u/MaxPlay Jun 16 '16

It's a physics update for the entity, not a literal step.

6

u/lewisj489 Jun 16 '16

So like a physics tick?

3

u/MaxPlay Jun 16 '16

yea, I guess so. I am not used to this code, since I don't work at Crytek, but I guess it is equal to a regular physics tick.

1

u/Ornim Jun 16 '16

that's a whole not of nope!

14

u/ghillisuit95 Jun 16 '16

I don't get it

35

u/errorkode Jun 16 '16

gamedev is somewhere in between real programming and shitty programming

1

u/ghillisuit95 Jun 16 '16

oh haha, thats funny

3

u/Niriel Jun 16 '16

And true. You've got to sacrifice so much purity and abstraction on the altar of performance, it's depressing sometimes.

11

u/Mpur Jun 16 '16

Oi, gamedev has shown me some of the most beautiful ugly code ever!

12

u/auxiliary-character Jun 16 '16

webdev's worse.