Jump to content
  • Advertisement
Sign in to follow this  
NightCreature83

Unmaintainable code

This topic is 974 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

It's like they got a ton of random programmers together, told them nothing at all and just said "code. Oh you also can't look or ever see what everyone is programming."

 

I hope theirs a suicide watch out on the person who has to maintain this code.

Share this post


Link to post
Share on other sites
Advertisement

I'm not by any means a programmer that can go look at code and see some weird things (though looking at this code gives me nightmares like it seems it does to everyone else) as I really am just an intermediate C++ Programmer that does struggle with code design, but I saw this bit of code and something jumped out at me and I laughed for some reason.

if(id==0)OPENAL_SetPaused(channels[whooshsound], false); 
//if(victim->damage>victim->damagetolerance){
   if(id==0){
         bonus=cannon;
         bonustime=0;
         bonusvalue=100;
   }
//}

I saw that and I said to myself "so wait, now that you commented out that other if statement you just essentially put two if statements back to back that check the same thing?  Nice!"  lol.

Share this post


Link to post
Share on other sites

This is... wow. If that actually compiles without errors, and the resulting binary actually works, then I bow in awe.

Not only it compiles, it is also very successful indie title.

Share this post


Link to post
Share on other sites

This program looks like it might have been developed using the following rule: you can only add new code, you can never delete or change existing code.Actually, that gives me an idea...


I like this new paradigm, I think the first two years of college should strictly enforce this, just to drive into the minds of students how vital it is to think ahead, before you begin writing anything.

Is their any formal name for this scheme, or should it be called the rip-off programming paradigm.

Share this post


Link to post
Share on other sites

This is far worse than my nesting issues in Java ever became .... good gods ....

The static void methods do not end until line 1176 !

 On the bright side, the variable declarations end on 243 .

 

This code does have an artistic style to it, flowing from jumbled nest to jumbled nest, like the waves coming and going at a beach.

 

if{ if{ for{ for{ if{ if{ if{ if{ for{

Share this post


Link to post
Share on other sites

I complain a lot about my own code structuring and how there's always a better way to structure it, which prohibits me from actually doing something meaningful with the code I'm working on. I guess if this is the inner workings of a "real" game and a somewhat successful one, I need to STFU and just get the project done.

Edited by cadjunkie

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!