Mirage Source

Free ORPG making software.
It is currently Tue May 28, 2024 8:13 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Oct 15, 2008 2:54 am 
Offline
Knowledgeable
User avatar

Joined: Sun Nov 19, 2006 6:59 pm
Posts: 213
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? ;) 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 ;) 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 ;).

Just a thought to save some bandwidth :)

_________________
Image


Top
 Profile  
 
PostPosted: Wed Oct 15, 2008 3:13 am 
Offline
Pro

Joined: Mon May 29, 2006 2:58 pm
Posts: 370
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.

_________________
Image


Top
 Profile  
 
PostPosted: Wed Oct 15, 2008 3:18 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
That's a pretty good idea. It would also make it easier to change messages.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Wed Oct 15, 2008 4:08 am 
Offline
Knowledgeable
User avatar

Joined: Sun Nov 19, 2006 6:59 pm
Posts: 213
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 :)

_________________
Image


Top
 Profile  
 
PostPosted: Wed Oct 15, 2008 6:27 pm 
Offline
Regular
User avatar

Joined: Wed Jul 30, 2008 4:32 pm
Posts: 44
Just look at vbGORE's codes... :)

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group