Mirage Source
Help Lower Bandwidth Usage - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51)
+----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44)
+----- Thread: Help Lower Bandwidth Usage (/showthread.php?tid=2246)



Help Lower Bandwidth Usage - JokeofWeek - 15-10-2008

Well, I had an idea before. You know all those times that you send a player a message that never changes, such as 'Not enough mana points' or 'A door has opened', etc. Each time that event occurs, it sends the player the whole string. Now, that's a pointless use of bandwidth as the message will never change, and this will build up after a while of constantly sending the string over and over. So I was thinking, why not just store those repetitive message in a string table/array on the client side? Wink Then you can just send over a byte (the Index of the message in the array) which would bring down the packet size by quite a few bites. If you want to save even a few more, store the color on the client Wink Sure people say never trust the client, but it's not like it matters if the client changes those messages through hacking cause it will only show up different on their client Wink.

Just a thought to save some bandwidth Smile


Re: Help Lower Bandwidth Usage - grimsk8ter11 - 15-10-2008

yes this is def. a thing to do. Most morpgs actually store in in either a bit file or plain text, allowing for translation to other languages to.

like

[byte for number][byte for color][byte for string length][plaintext string]

yeah, players can edit it pretty easy, but hey, it makes funny screenshots?

or you could have the lengths fixed in the client, so it only loads certain lengths, diffferent for each language.


Re: Help Lower Bandwidth Usage - GIAKEN - 15-10-2008

That's a pretty good idea. It would also make it easier to change messages.


Re: Help Lower Bandwidth Usage - JokeofWeek - 15-10-2008

Great idea Grim, only problem is that this would only work for certain messages, unless what you did is stored every single messages and replaced things like the Damage with \1, \2, etc., like so : 'A \1 hit you for \2 damage' and then just make a parser to replace those \1, \2 with the values, that way allowing for total translation and a huge save in bandwidth Smile


Re: Help Lower Bandwidth Usage - Kraft - 15-10-2008

Just look at vbGORE's codes... Smile