Sign in to follow this  
NightCreature83

Unmaintainable code

Recommended Posts

Ohforf sake    2052
Read a bit into it and it seems, that all the game logic, all the little scripts that you usually attach to triggers, everything of every level, even dialogs, was compiled into the Game::Tick function, including the trigger checks for them (if (distanceToThing < ...) { ...} ).


If there was a yearly contest for the Coding Horrors forum, that 6854 LOC method would be a close contender. If at all, only seconded by that OBJ rendering code s.b. posted.

Share this post


Link to post
Share on other sites
mhagain    13430

I've just done something incredibly stupid.

 

I looked at more of the code.  OK, I was thinking along the lines of "it can't all be that bad, maybe this one is some kind of freak and the rest of it is normal".

 

It is all that bad.  I need to go lie down in a dark room now.

Share this post


Link to post
Share on other sites
Migi0027    4630

I really hope overgrowth is doing better, because that code beyond terrible. If in If in If in If IF IF IF! wacko.png

 

For the first few seconds I was still looking for it, and thinking that it was a blank page, nope.

 

nuke it....it's the only way to be sure.

 

Nuking it won't be enough I'm afraid, NUKE IT TWICE DAMMIT!

Edited by Migi0027

Share this post


Link to post
Share on other sites
TheChubu    9454

 

On the other hand, it shipped as part of a pretty damn successful indie title. On that score, not bad?

 

If that's the actual code the produced the title that shipped (and not some kind of joke), then like I said, I bow in awe. I find that code horrible, but as bad as the code may look... writing such a thing is one story, debugging and making it work it is yet another.

 

If the author really managed to turn this into a working product (and if it was successful, it must have been kind of functional), that was truly some great work. Now imagine what he could do otherwise...

 

The authors are these guys http://www.wolfire.com/

Share this post


Link to post
Share on other sites
Hodgman    51339


I note from their blog post announcing it's release: "The coding style is what you might expect from a self-taught high school student, so it could be a challenge to understand" so at least the author(s) acknowledge it's dreadfulness (if in a somewhat understated way),
Until I read that, I assumed that the code was produced by an automated tool, stitching together snippets laugh.png .... sad.png

 

On the bright side, their compilation times would be pretty fast!

Share this post


Link to post
Share on other sites
Madhed    4095


On the bright side, their compilation times would be pretty fast!

 

Yeah, if they never ever have to change anything in that code again, ever.

Which I really hope for the poor soul that has to maintain this abomination.

Share this post


Link to post
Share on other sites
swiftcoder    18437


On the bright side, their compilation times would be pretty fast!

At this point I feel compelled to point out that the previous thread is ApochPiQ posting an entire compiler implemented as a single 10,000 line file...

 

The line between awesome and awful can be a very fine line.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this