Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • If you want I could send you my File Sender source code. I am too lazy to make an example within a timespan that will suit you, but I will soon. PM me if you want my source.

    Working as fast as I can on Fusion 3

  • Jamie, could you please tell me how can I send a stack message with one byte and one short in C++?
    I've tried to figure it out myself, but it always seems to lost the last value. For example, if I send a stack with char and short, then MMF reads the char, but it can't read the short properly. And if I send a stack with short and char, then it can read the short, but can't read the char...
    I'm sure I'm doing something wrong, so please show me some example on how to do it :)

  • On the Sender's Side:
    Push Byte (some value) onto stack
    Push Short (some value) onto stack

    On the Receiver's Side:
    Get Byte (signed/unsigned) at 0
    Get Short (signed/unsigned) at 1

    Working as fast as I can on Fusion 3

  • In C++ LB...

    EDIT: My guess is that the C++ version of lacewing needs you to send the whole stack in one go, not push element by element. Best wait for Jamie to be sure.

    Please login to see this picture.

  • The whole stack/text/number message system is an MMF2 thing. C++ Lacewing just transmits binary buffers with a subchannel and type (0-8). The MMF2 extension uses type 0 for text (ASCII char array), 1 for number (4 byte integer) and 2 for a stack (little endian binary buffer).

    Quote from Greg

    Jamie, could you please tell me how can I send a stack message with one byte and one short in C++?

    Code
    char Message[3];
    
    
    *(char *) Message = TheByte;
    *(short *) (Message + 1) = TheShort;
    
    
    Channel.Send(Subchannel, Message, 3, 2);
  • Given that, this might be safer:

    It looks more longwinded, but it's safe against sizing errors, and it's much easier to add to the message. Obviously you'd name "struct Message", "Message::theByte", and "Message::theShort" more sensibly, and have different structs for different messages.

    Please login to see this picture.

  • Jamie, how about sending a string in a stack? I've tried this:

    Code
    char Message[3];
    string s = "abc";
    
    
    *(string*)Message = s;


    ...but the app crashes then. I've also tried:

    Code
    char Message[3];
    string s = "abc";
    
    
    (string)Message = s;


    But it doesn't work either.

  • Dynasoft, your solution works, but only if the string is the only thing I send in the stack. I need to send it along with some char and short values.

    EDIT:
    Nvm, I've already figured it out! Thanks! :)

  • Jamie,

    Could you post an example of how to send a file using lacewing. I tried doing it, and I get the file, but the file that is sent returns 0 kb with no data.

    I am confused about position and size.

  • Position is the position in the stack, which normally is 0 if you are only sending file data, and the size you can get via an expression to get the size of the stack. The easiest thing to do is to create the file with the File Object, then use Lacewing's Append Stack to File action. You can send large files in small chunks, too, which should be some simple math ;)

    Working as fast as I can on Fusion 3

  • Hello,

    I have a very strange bug.

    I try to send (X,Y) to the channel via Stacks, but when the other client received the stack, X is set correctly but Y takes a strange value.

    Please login to see this picture.

  • You are reading the short from 1, when really it is at 2. A short has two bytes worth of data. Just change the second parameter to two, where you are changing the Y position, and it should work fine.

    Making games at Please login to see this link..
    Please login to see this link. on Twitter.

  • Jamie, thanks for this! Since Flash isn't capable of UDP, stacks will help quite a bit (I hope!).

    Kevin Gunn (Tuna) - Hey! Check out MechaBall on iTunes by scanning below!
    [SIGPIC][/SIGPIC]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!