How do I send types instead of strings with WinSock (VB)?

Started by
11 comments, last by Roman Gorkiewicz 24 years ago
Thanks SiCrane.

This helped.

Though I use UDP your example should work anyway. Even if a message gets lost.
Advertisement
In a real-time game, you don''t want the guaranteed message delivery of TCP. I mean, it''s not good to loose a bunch of packets, but if a packet does wander astray in transit, you certainly don’t want to spend time trying to recover that data because by the time you finally receive it you could end up with a player’s location from a few moves/seconds ago. Then what are you going to do with that data?

It’s best just to move on and hopefully get the next packet and then just speculate the path say from move 1 to move 3. This is only for real-time of course not including chat programs. In turn-based games it’s more crucial to receive every packet.
Thank god for DirectPlay.

Some "fun" TCP/IP reading: http://www.microsoft.com/technet/deploy/tcpintro1.asp

============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown
============================Daniel Netz, Sentinel Design"I'm not stupid, I'm from Sweden" - Unknown

This topic is closed to new replies.

Advertisement