Jump to content

Easy netcode improvement


Recommended Posts

I worked up a quick VB example that could help the Dev team a lot... As of know i understand you are sending the packets as a string, through UDP....

I worked up an example of how to send an Array of Doubles through Winsock, but this method would even work for cutom Types...

This would help you all in several ways....

1. you wouldn't need to waste cpu cycles putting the data into a string, or breaking the string back into data

2. You can cut down the amount of data to send...

i.e. "1234.23432123" is 13 bytes, as opposed to just sending the 8 bytes that a double takes up... also including the ,'s would add an extra byte... All in all you could save a lot of space if you could use this method to send everything using the smallest amount of memory possible....

If someone on the DevTeam (if you are the net coder or otherwise)... would send me a PM with your e-mail address i can send you the project as an example.... because I don't have any web hosting services up right now....

Kent

Link to comment

gtatari is going to host the file for me... a zip file containing the project, and a text file for the source.... it was kinda a quickie... but i think the idea is there..

The concept that i use should be tweakable (if thats a word) to the point that you can change a lot of stuff but it should still work... possibly even copy it to a more compact string and still allow you to use Zlib compression on it... if you have any questions feel free to PM me..

Kent

Link to comment

Isnt VB a little slow for game/network programming ?

VB has to load each funtion from libary's and that takes some time up too... while other languages such as C++ or pascal has the funtions embedded...

Link to comment
  • 3 weeks later...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...