Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

graveyard filla

threaded programming with games? networking?

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

high, i have a question. is there any reason to use threaded programming for games? i see no need for them, but im curiouse as to why i would want to use threads. ive heard that music and networking requires threads.. although i use SDL_mixer which apparently must create threads for me, because i never needed threads for music/sound fx yet in my games. BUT, i am currently learning network programming with SDL_net, (i plan to network the game im currently working on - a top down action/RPG).. anyway, my question is, will i need threaded programming for networking? ive read beejs guide to sockets programming and now im studying the SDL_net docs... havent written any code yet though. just lookin for a heads up. thanks

Share this post


Link to post
Share on other sites
Advertisement
Not for SDL_net, no. You just check for incoming packets or stream data every trip through your game loop, handling it if there is any. In fact, anything else would be unnecessarily complicated for a small project. But if you are running a MMORPG server on a dual-processor system, it might be of some benefit :-)

Share this post


Link to post
Share on other sites

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