Network trouble :)

Blitz3D Forums/Blitz3D Programming/Network trouble :)

ozak(Posted 2005) [#1]
Hi. I'm using TCP/IP for an action game I'm developing and I have a few questions (Maybe they belong in the newbie section, but let's see).

1. How do you tell if a player disconnects a TCP/IP stream?
EOF maybe?

2. When I test the game on local host there's large delay between when client presses a key until the server is updated? I tried setting the TCP/IP delay to 0,0 (0,0,0 as in the manual gave me an error?)
Is this normal because of the localhost loop (I've done some servers in C++ and java and they don't seem to suffer from this). Is there perhaps some internal buffering going on here?

Thanks in advance


Ross C(Posted 2005) [#2]
You should look into using UDP if your after speed :o)


ozak(Posted 2005) [#3]
Actually TCP/IP is fast enough and in C/C++ and Java there's no delay. So it might be something inside blitz3d?

Anyone?


ozak(Posted 2005) [#4]
Hmm. I looked into UDP too, since I got no real response (Sorry Ross :).

It works a bit better, although I now suspects it might have been a problem with my code.
But why are all UDP commands erased from the help file? (They are there in the demo). Are they being phased out or is it merely an error?

Thanks in advance as usual :)


Jeroen(Posted 2005) [#5]
Ozak, I recommend BlitzPlay, a network library for Blitz3D. It will really help you with things like disconnecting players and such.


ozak(Posted 2005) [#6]
I'm looking at it now, and it looks kinda neat.
Not sure about paying 50$ for guaranteed delivery though, so I'm probably going to take a crack at it myself :)


Damien Sturdy(Posted 2005) [#7]
BlitzPlay Is great. The guy deserves his money.

I however simply use BlitzPlay Lite as it fulfills all my needs.


ozak(Posted 2005) [#8]
I didn't mean it was too expensive, I just meant that I didn't need most of the extra functionality. It's a great library :)


Ross C(Posted 2005) [#9]
Try RottNet, or BlitzPlay Lite, both are free :o)


Tibit(Posted 2005) [#10]
If you need the features of TCP (reliable msg) I would recommend you use it! It is fast enought (obviously depending or you design) and if you have previous experience with it I see no reason to revert to UDP for sole speed.

Do you design for internet play through 56k modems or people with fair connections or even LAN?

Run a simple test. I assume it should work good unless you need exceptional speed over bad connections (like the internet could cause)


Damien Sturdy(Posted 2005) [#11]
As i said, I use Blitzplay as its a breeze... Now, for reliable messaging i use TCP. TCP has been proven to be fast enough even over broadband connections providing you only open the connection once ;) (i've seen code open, read/write, close, loop)


ozak(Posted 2005) [#12]
Actually TCP/IP (as stated earlier) causes a huge delay before it starts sending (after which all is well). This might be due to internal buffering so UDP would allow me a bit more control. I don't see this delay in C/C++ and java apps som maybe Blitz3D is buffering smaller values internally.
Either way, blitzplay and rott seems to work just fine :)


Damien Sturdy(Posted 2005) [#13]

causes a huge delay before it starts sending



But thats only if you keep reconecting... Ive never come across any such slowdowns myself?