TNT Basic Forums > Programming Q&A
Net Code
< Last Thread     Next Thread >
Thread        Post A Reply

04-10-2002 22:57

Posted by:
Douglas O'Brien

Find more posts by Douglas O'Brien

I was playing around with the networking section of TNT and this is sort of the first network programming I've really done. I noticed a lot though. I now realize why games always have a host instead of sending all that data too each other. It really seems like the only way to keep it all straigt and fast. The command "Send Net Int/Float/Str" sends that data to everyone and I was wondering if it would be any faster for games with hosts to have a "Sent Net Host Int/Float/Str" so unessary data doesn't go to all the other machines. Especially those slow ones. With youlls network library would this be possible?

04-11-2002 22:12

Posted by:
Mark Tully

Find more posts by Mark Tully

John's the expert on this, so I could be off base here.

TNT Basic uses NetSprocket, and that NetSprocket used to and presumably still does (if it survived carbonisation!) do something called "auto host negotiation". Basically, one of the clients in the game is the host, and all others send data to it and it sends them to every one else. This addresses the problem you point out, that sending data to everyone is wasteful.

Auto host negotiation means that if the machine that has been selected as the server dies, a new one is picked auto magically and the game carries on.

That's how it worked when I last looked at networking over a year ago anyway!

Hope this helps!


All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.