Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 5, 2007, 12:05:46 AM (16 years ago)
Author:
scheusso
Message:

extended GameStateManager:
added functions

  • encode (takes two gamestates and returns a diffed and compressed gamestate)
  • decode (opposite of encode)
  • compress (called by encode) — not yet implemented
  • decompress (called by decode) — not yet implemented
  • diff (called by en/decode)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/network/GameStateManager.h

    r346 r385  
    3535 * - writing gamestates to universe
    3636 * - diffing gamestates ?
     37 *
     38 * EN/DECODATION:
     39 * a: last Gamestate a client has received
     40 * b: new Gamestate
     41 * x: diffed and compressed gamestate
     42 * x=(a^b)
     43 * b=(a^x)
     44 * diff(a,diff(a,x))=x (hope this is correct)
    3745 * @author Oliver Scheuss
    3846*/
     
    4351  GameState getSnapshot(int id);
    4452  bool loadSnapshot(GameState state);
     53  GameState encode(GameState a, GameState b);
     54  GameState decode(GameState a, GameState x);
    4555private:
    4656  void removeObject(orxonox::Iterator<Synchronisable> &it);
    47 
     57  GameState diff(GameState a, GameState b);
     58  GameState compress(GameState a);
     59  GameState decompress(GameState a);
    4860};
    4961
Note: See TracChangeset for help on using the changeset viewer.