TNT Basic Forums > Programming Q&A
Important Info About Networking
< Last Thread     Next Thread >
Thread        Post A Reply

04-21-2002 04:04

Posted by:
Douglas O'Brien

Find more posts by Douglas O'Brien

Hi, I ran some tests with a little network of 3 computers in my house. I got some info which may / may not be important.

---You CAN'T send messages while inside of a "While More Net Messages" loop. I found this out and John explained some technical reason to me also. Instead, you have to keep a record of what all you want to send, and then once outside of the "While More Net Messages" loop, you can send it all.

---Ping times are ok. I have only tested on a LAN network. The computers speed plays a pretty big roll, as well as whoes hosting. When it was just a 400 G3 and a 600 G3 ping times were about 30ms. I can't remember what the 150 machine usually came in at but it was quite a bit slower. Not outrageously slower though.

---Band Width tests were interesting. I would send a bunch of Integers from one computer to another. I timed how long it takes a computer to send a certain number of Integers as well as to recieve. To send 200 Integers on a reasonably new computer takes about 20ms. To receive takes 1 to 0 ms !!! It's interesteing how it takes so much longer to send than receive but the receiving doesn't start right away I guess. AND, I noticed you CAN'Tsend more than 200 Integers in a cluster. You can send 199, even 200, but not 201. It apparently can't hold more than 200 in the network buffer. AND, when I ran this band width test on the 150 machine and one of the newer computers...the 150 couldn't handle all the data. It is too slow. All the incoming or outgoing data overloaded it and it disconnected.

Lets say you are making a multiplayer game with many people and lots of objects. You will probably need to let the host handle all the sending of data to people because there really is no other way to keep everything smooth and in sync. For example, when you fire a bullet, you tell the host you want to fire, then he sends that to everyone. As well as everyone else's movements and fires and so on...It may be kind of wasteful when you want to tell just the host you want to fire when that information will go to everyone. But, since the network buffer can only hold 200 Integers aparently, as well as the processing time required to handle networking (especially on old machines), this may affect how you set a program up. For example, it might be easy to let the host send the coordinates of all the objects and have the players draw at those spots. However, it would be a lot easier on the network if he sends the creation of things. For example, instead of sending a bullets X and Y location each frame, he sends the starting X and Y and the change in X and Y for each frame. Then he never sends anything about it again. Hopefully, all computers would do the math the exact same down to the last decimal place or they may all get out of sync.

Any way, if any one wants to try a little pinging program I made over the interent with me to see what kind of times we get, then let me know. We could meet on AIM or IRC or something.

04-24-2002 00:18

Posted by:
Douglas O'Brien

Find more posts by Douglas O'Brien


Also, I noticed that in 1.03

Sent Net Integer Works!
Send Net String Does Not :(
Send Net Float - Not sure, haven't tried yet.

Technically one can get by with out being able to send strings but it would really be nice. I hope it's not too hard to fix.

Is anyone else actually taking advantage of TNT's simple Network commands? Hopefully I'll have my 8 player internet Tron I just started done pretty soon.

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.