jeudi 9 mars 2017

Mutable Flatbuffers, Performance loss?

How much of a performance loss is there to use flatbuffer mutable?

Is it "correct" use of flatbuffers to have a object/stuct which should be editable (ie game state)

In my example i have the following classes at the moment:

class Game:
    std::vector<Player>;
    int frames;

class Player:
    std::string name;
    int oil;
    std::vector<Unit>;

class Unit:
    int id;
    int hp
    ...

Would it be sensible to use a flatbuffer for each of these objects storing all information about each unit? Or would a mutable flatbuffer decrease performance?

If flatbuffers are wrong tool for this job, which technology should be used?

Aucun commentaire:

Enregistrer un commentaire