perjantai 22. heinäkuuta 2016

Today's progress

Made the socket.io server secure, it was very easy, just had to use https instead of http. Worked on Ethereum stuff, added support for delegated messages in the game server. This way the player does not have to interact with Ethereum directly. Here is a snippet showing how it is supposed to work:

    function delegateConnect(address snd, address addr,
                             uint8 v, bytes32 r, bytes32 s) {
        bytes32 hash = sha3("connect", snd, addr, nonce[snd]);
        if (!connection[sha3(snd,ecrecover(hash, v, r, s))]) return;
        nonce[snd]++;
        delegations[snd]--;
        connection[sha3(snd,addr)] = true;
    }

Next week I'll make the camera follow the character in the game, and support for background images in levels.

Ei kommentteja:

Lähetä kommentti