Jump to content
  • Advertisement
Sign in to follow this  
Sir Sapo

What Data Type to Send

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

Hey guys, I've got a question I'm sure one of you guys can answer off the top of your head. Should I convert all of my variables (they are all doubles) to chars before I send my packet, then reconvert them back into doubles of the other side, or is this more trouble that it is worth. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
You cant do that anyway, you would lose accuracy. Just send doubles, or drop them down to floats.

ace

Share this post


Link to post
Share on other sites
It depends on how much space you'd like to save, and how much accuracy you need. :)

In one of my previous projects, I converted my floats to shorts (and multiplied by 100 to save two decimal places).

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!