Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    135
  • comments
    130
  • views
    52717

WOW

Sign in to follow this  
VisualLR

151 views

Just signed up for the World of Warcraft stress test. I didn't get into the beta back when it started, and not being a real MMORPG fan I wasn't devastated. But from what I've heard, this one will be worth picking up, so I'm happy I get to play it in a couple of days, or whenever they open it for testing. It's downloading on my home computer as I write this.

On other news, I'm fucking starving, lunch won't be here for another 40 minutes...

What else? oh yea, I guess I'll finish this with another quick tip.

Never, EVER hardcode numbers, if you need to, use a const variable for it, this will describe what this number is being used for. Doing stuff like this:

float fAltitude = fCurrentAltitude * 0.304799f;

will just confuse the hell out of whoever tries to read your code, instead, do this:

const float fMetersToFeetRatio = 0.3040799f;
float fAltitude = fCurrentAltitude * fMetersToFeetRatio;

by doing it this way you don't have to guess what's going on, it's plain to see you're converting fCurrentAltitude from meters to feet.

And that concludes todays quick tip.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

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
  • 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!