About Store Forum Documentation Contact
Donations:
345$/mo



Post Reply 
Sending and receiving neighbor matrix
Author Message
Babulesnik Offline
Member

Post: #1
Sending and receiving neighbor matrix
I use to send and receive position neighbor class FastConnection. Data is transmitted normally, but sometimes twitch tank neighbor.I think that this is due to the fact that I pass the matrix actor,the physical body.Also, if there is a delay in receiving data. The object appears in the other. This leads to bad consequences. How can this be avoided? I do not know how it is being implemented in games.
   

Send:
Code:
void Send()
{
    SockAddr addr;addr.fromText(TextAddres()());
    File f;f.writeMem();f<<BRDM.actor_hull.matrix();f.pos(0);
    FastConnect.send(addr, f);
}
Receive:
Code:
Send();

       for(SockAddr addr;;)
    {
        Byte data[65536];
        Int  rcv = FastConnect.receive(addr,data);
        
        if(  rcv<0)break;
        {
            File f;f.readMem(data,SIZE(data));
            f>>matrix;
            BRDM2.actor_hull.matrix(matrix);
        }
    }
11-20-2011 07:06 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Sending and receiving neighbor matrix
Try looking into Esenthel MMO sources for sending angles, position.
Interpolator classes are used.
which do per-frame interpolation.
instead of matrix send position + angles.
11-21-2011 12:32 PM
Find all posts by this user Quote this message in a reply
Post Reply