mplay speed improvement using strings
#1
Posted 09 September 2010 - 08:28 PM
#2
Posted 09 September 2010 - 08:35 PM
Why don't you try ?Would compressing all the values into one string, sending the string, and then extracting the values from that string thats recieved on the other application run quicker?
#3
Posted 09 September 2010 - 08:40 PM
Why don't you try ?Would compressing all the values into one string, sending the string, and then extracting the values from that string thats recieved on the other application run quicker?
To put it bluntly, i cant be bothered.
I'd have to recode my game, or create a new test game and some scripts just for to see it it runs quicker.
I was hoping someone just knew the to save me the time. If not though, i will try it out myself.
#4
Posted 09 September 2010 - 10:11 PM
Why don't you try ?Would compressing all the values into one string, sending the string, and then extracting the values from that string thats recieved on the other application run quicker?
To put it bluntly, i cant be bothered.
I'd have to recode my game, or create a new test game and some scripts just for to see it it runs quicker.
I was hoping someone just knew the to save me the time. If not though, i will try it out myself.
No this probably won't be faster. Each character of a string is one byte. So if you send 3642 as a short, this is two bytes. If you send "3642" that is four bytes. This already doubles the data size. After you multiply this by the 15 values you have, plus any delimiting or formatting you would need to add in, it becomes apparent that sending numbers is a lot slower than sending strings.
PS: I just saw you were using MPlay. The above advice is from my experience with 39dll. I'm not sure if MPlay uses a different system, but I'm almost positive that strings will still be slower.
Edited by tie372, 09 September 2010 - 10:13 PM.
#5
Posted 10 September 2010 - 04:25 AM
And MPlay has a bad reputation of being HORRIBLY SLOW.
Edited by brett14, 10 September 2010 - 04:26 AM.
#6
Posted 10 September 2010 - 12:54 PM
Either way, it will not make the game faster, because there is no magic synchronisation system. When a message is sent, the game simply continues execution. It doesn't wait for the message to arrive at the other side. An MPlay function hardly takes any time to execute, so if you experience lag, it's mostly due to some other part of the game.
Putting all messages into one gigantic string might cause less bandwith usage - that of course only if it only consisted strings in the first place - but will certainly make your game slower because you have to pack everything into a single string and explode it again when the message arrives.
Edited by Medusar, 10 September 2010 - 12:54 PM.
#7
Posted 11 September 2010 - 11:40 AM
MPlay is said to have a massive overhead when it comes to using bandwith, so if you're worried about that you've got to use 39DLL.
Either way, it will not make the game faster, because there is no magic synchronisation system. When a message is sent, the game simply continues execution. It doesn't wait for the message to arrive at the other side. An MPlay function hardly takes any time to execute, so if you experience lag, it's mostly due to some other part of the game.
Putting all messages into one gigantic string might cause less bandwith usage - that of course only if it only consisted strings in the first place - but will certainly make your game slower because you have to pack everything into a single string and explode it again when the message arrives.
Thank you for the detailed explanation. I think it's the 3D graphics thats slowing it down.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users



This topic is locked








