TNT Basic Forums > Programming Q&A
Networking, the bad and good
< Last Thread     Next Thread >
Thread        Post A Reply

02-26-2006 20:09

Posted by:

Click Here to Email BinarySpike   Find more posts by BinarySpike

I made a Networking game in TNTBasic but came across a strange error... the host and client arrays weren't being updated correctly.

On the client only the X was changing, and only displayed the X (so the host didn't move up or down in the clients screen)

Now there are only two lines difference between the host and client... So I decided to add a LPosX and LPosY (Local Posistion X/Y)

And the host updated it's PlayerID Pos and the client updated thier PlayerID pos (Net ID to be exact)

Which worked great! so I worked in combinding the two together and made one game as host and client. (you can choose)

The only problem is "Net Player Count" doesn't start at 0
so I would overstep my array when the max players was reached.
(currently four)

If fixed this by adding "Net Player Count-1"

So why isn't there a "MaxPlayerID" or "MaxNetID" ????
That would make networking with a variable amount of players super easy.

Now, not to be a critic but couldn't you put something in the help file included with TNTBasic about Net Player Count returning one higher than the maximum player count and if they need the max amount of ID's that are playing they should get minus it by one...

I think it would help... I'm about to post my networking example... it'll have a lot of comments just so ppl know what's happening.

Anyway, TNTBasic is great, and I'm gonna use it in my next science fair project for showing the types of Game Networking.

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.