Jump to content
  • Advertisement
Sign in to follow this  
Mussi

If statements are all you need

This topic is 923 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

Advertisement

Well, it's a game about a dragon. If you zoom all the way out, out, out, tilt your head to the right, and squint your eyes, you can almost see the dragon.

Share this post


Link to post
Share on other sites
At first I thought it would just be if statements instead of other control flow techniques. But no, it's much worse than that.

if (printHPMax - 90 >= 0)
{
    hpTen = 9;
}
else if (printHPMax - 80 >= 0)
{
    hpTen = 8;
}
else if (printHPMax - 70 >= 0)
{
    hpTen = 7;
}
else if (printHPMax - 60 >= 0)
{
    hpTen = 6;
}
else if (printHPMax - 50 >= 0)
{
    hpTen = 5;
}
else if (printHPMax - 40 >= 0)
{
    hpTen = 4;
}
else if (printHPMax - 30 >= 0)
{
    hpTen = 3;
}
else if (printHPMax - 20 >= 0)
{
    hpTen = 2;
}
else if (printHPMax - 10 >= 0)
{
    hpTen = 1;
}
else if (printHPMax - 10 < 0)
{
    hpTen = 0;
}

Share this post


Link to post
Share on other sites

It looks like something someone would write who had a very, very basic understanding of C#, and both a lot of time on their hands, and an unwillingness to learn more about C#.

Share this post


Link to post
Share on other sites

It looks like something someone would write who had a very, very basic understanding of C#, and both a lot of time on their hands, and an unwillingness to learn more about C#.


This. 10-year-old me wrote code like this in QBASIC before he knew any better. Kudos are due for actually releasing it AND getting positive reviews.

Share this post


Link to post
Share on other sites

Hah, that was my thought, I think I've written similarly bad code when I was young, though I'd like to think I'd have been more lazy about all that typing and have wanted to look up how to use arrays and whatnot.  Luckily I have no code that old to look back upon.

Share this post


Link to post
Share on other sites

This. 10-year-old me wrote code like this in QBASIC before he knew any better. Kudos are due for actually releasing it AND getting positive reviews.


Wow, yeah, same start here. :)

btw, did anyone else read this thread's topic as a question? "If statements are all you need, then ...?"

Share this post


Link to post
Share on other sites

Not sure if the following quote is true as I couldn't find the source, but it's from an image on twitter.

 

How long was the development period?

 

C: I started work on the game in the middle of March 2012, so... two and a half years now?

 

What has been your hardest struggle with development?

 

C: Aside from marketing? Programming, definitely. That's the one thing I don't really have experience with. Until this game, the only education I had in writing code was when I took a 100-level Java course from a community college, and I straight-up got an F. Failing out of a hundred-level course in a community college, that's a special kinda shame :v

 

 

 

 

Lines of Code are a terrible metric, as we all know: http://hg.icculus.org/icculus/lugaru/file/97b303e79826/Source/GameTick.cpp#l5300

 

Hehe true that, but it was actually a warning for mobile phone users :P.

 

 

btw, did anyone else read this thread's topic as a question? "If statements are all you need, then ...?"

 

If statements are all you need, then you're happy as a programmer? This could be a game for the lounge.

 

 

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!