User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21

Thread: RE channels, send, blast, stacks

  1. #1
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Sep 2006
    Posts
    511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RE channels, send, blast, stacks

    Just a few of questions

    1. Can you be logged into more than one channel
    at once?

    2. When you leave a channel do you leave the server?

    3. I know blast is quicker than text but,
    Is SEND number quicker than SEND text?
    Is BLAST number quicker than Blast text?

    4. I know the stack thing saves bandwidth, but
    does that affect the speed as well?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: RE channels, send, blast, stacks

    1. Yes.

    2. No!

    3. Depends. Each number is stored in 4 bytes. Text is stored in one byte per character. Sending "12" as text would therefore be 2 bytes, 1 byte less than a number.

    4. Yes... of course.

  3. #3
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Sep 2006
    Posts
    511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RE channels, send, blast, stacks

    thx for the response

    So stacking is faster even if what is being sent is small?
    like ZZ for example.

    It looks like stacks is only better if you are using 3 or more characters in a given segment
    (EX ab,123,5)
    So the only one worth stacking would be the 5 correct?

    What I was wondering was if the process of unstacking or the propcess of waiting for the information to stack causes more delay than blasting when the figures are small. Meaning would it improve the overall reaction time for the user recieving the message.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: RE channels, send, blast, stacks

    Quote Originally Posted by dascribe
    thx for the response

    So stacking is faster even if what is being sent is small?
    like ZZ for example.

    It looks like stacks is only better if you are using 3 or more characters in a given segment
    (EX ab,123,5)
    So the only one worth stacking would be the 5 correct?
    123 would be 3 bytes as a string, 1 byte as a byte pushed onto a stack. Check this.

    Quote Originally Posted by dascribe
    What I was wondering was if the process of unstacking or the propcess of waiting for the information to stack causes more delay than blasting when the figures are small. Meaning would it improve the overall reaction time for the user recieving the message.
    No. Any processing done by Lacewing is negligible. Parsing a text string would be the slowest thing to do, whereas stack messages and number messages are exactly the same.

    The bottleneck is the network connection here, not the CPU.

  5. #5
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RE channels, send, blast, stacks

    Anywhere except network traffic, I'd recommend the approach that used the fewest events, and least expression code. In general, MMF's event engine is slower than anything an extension can do.
    In C (taking calculating distance between objects as an example), doing (object->posx - object2->posx) * (object->posx - object2->posx) is considerably quicker than doing pow(object->posx - object2->posx, 2), because raising a number to a power is one of the slowest operations, by several orders of magnitude. In MMF, (X("object") - X("object2")) pow 2 is considerably faster than the multiply version, simply because it is shorter code.

    With network traffic, bytes/second are king.

    You definitely don't want to join things together as a string. It was a common piece of advice with Moo (which didn't have stacks), but it generally increased the amount of data being sent and added significant extra complexity to receiving.

    I probably didn't need to go into all that detail. Hopefully someone finds it interesting.

  6. #6
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Sep 2006
    Posts
    511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RE channels, send, blast, stacks

    Yes, it is interesting!

    The great question being posed is AMD vs Intel (just kidding let's not go down that road lol)

    Here is the question I'm getting at.
    Is it more important to have smaller shipping or less events?

    I know both is the ideal, but if one has to be slightly compromised, which factor has a greater impact on user experience/game performance?

  7. #7
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: RE channels, send, blast, stacks

    It's more important to have fewer bytes transmitted than less processing.

  8. #8
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RE channels, send, blast, stacks

    For an online game you have a hard limit on upload data (user to server) of less than 10 kB/second for everyone (except dialup/mobile net users) to be able to play, ideally less than 1 kB/s. That includes lacewing packet overhead (4-6 bytes per send action). 1 kB/s is 20 bytes per frame at 50 fps, and only 10 at 100fps. Subtracting off packet overhead, that's a single 4-byte message! You might just get away with "always" sending X and Y pos as a stack of two 2-byte numbers, but you'd be pushing it.
    EDIT: And that's ignoring the overhead of the actual network packets, which is 40 bytes for TCP/IPv4 per packet (but they're automatically combined to reduce overhead) and 28 bytes per packet for UDP (which aren't automatically combined). That eats up your entire per frame allowance before you've even sent anything!

    It really is hard work to keep data transmission down.

  9. #9
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: RE channels, send, blast, stacks

    You shouldn't be sending data every frame anyway, though. 10 FPS sending is fast enough with some decent dead reckoning (try count to 10 in a second).

  10. #10
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Sep 2006
    Posts
    511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RE channels, send, blast, stacks

    ok, I'm sold

    Just couple of things:

    Do you have to use the Zlib?

    Is the ACSII case sensitive?

    Is it faster for sending chat text as well?


Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Blue Stacks (Android emulator)
    By DJFuego in forum Android Export Module Version 2.0
    Replies: 11
    Last Post: 14th April 2012, 09:29 PM
  2. Lacewing Stacks Help
    By Sumo in forum Lacewing
    Replies: 3
    Last Post: 27th November 2010, 12:56 AM
  3. Lacewing Stacks Help
    By Sumo in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 24th November 2010, 12:39 AM
  4. channels and send to peer
    By dascribe in forum Lacewing
    Replies: 2
    Last Post: 28th May 2010, 01:31 AM
  5. "Blast" vs "Send"
    By Eclektik in forum Lacewing
    Replies: 5
    Last Post: 24th May 2009, 06:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •