firebolt55439 / Diep.io-Protocol

A project dedicated to reverse-engineering diep.io's client/server protocol.
33 stars 10 forks source link

Endianness #12

Open firebolt55439 opened 8 years ago

firebolt55439 commented 8 years ago

All float32 values are actually little-endian; what may be confusing is that it is sent as big-endian across the wire (e.g. across the network).

Relevant code from extension to illustrate:

if((i + 40) < event.data.byteLength){
    for(var j = i; j <= (start + off + 4*5); j += 4){
        console.log("Leaderboard Score: " + dv.getFloat32(j, /*littleEndian=*/true));
    }
}
firebolt55439 commented 8 years ago

^ @FlorianCassayre