OpenParsec / openparsec

GNU General Public License v2.0
52 stars 8 forks source link

Optimize Networking #1

Open uberlinuxguy opened 11 years ago

uberlinuxguy commented 11 years ago

The Remote events were designed with 8 players in mind, Go beyond that and insanity happens This is due to optimal UDP payload being 1400 bytes in size.

Update CrazySpence:

With my commit last night several small int values were changed to byte in the RE system to save space. byte = 1 byte uint_8 word = 2 bytes uint_16 dword = 4 bytes uint_32 in cases where values can be garaunteed below 255 a byte should be used. The PLAYERANDSHIPSTATUS RE needs to be broken apart as it is too large in its current state. Planning to break it into multiple RE's or perhaps a single RE with flags to save space, this should improve our maximum player count which currently sits at 8-9. Upto 16 can be connected but only ship movements make it through, Weapons fire and extra RE's are dropped due to exceeding the pre defined max data length with is 1400.

uberlinuxguy commented 11 years ago

Adding this to the 0.3 milestone for now, doesn't have to be a stopper for that version, but will be good to keep it visible.

uberlinuxguy commented 10 years ago

Bumping again, but to 1.0.

uberlinuxguy commented 10 years ago

Changed the title to "Optimize Networking."

Possible networking replacement, per @slime73 is: http://enet.bespin.org/index.html

tribad commented 6 years ago

Why not use multiple packets? Incorporate a flag to mark them for different purpose. Would remove any limits on players or whatever limit may occur next.