christerk / ffbclient

HTML5 ffb client
MIT License
9 stars 4 forks source link

Evaluate Compound Command for all ModelChanges in a ModelSync #6

Closed SanityResort closed 6 years ago

SanityResort commented 6 years ago

So far it seem that all ModelChanges in a ModelSync define one atomic modification to the state. We need to look into this if this is true for all modes (replay, spectate for now). If so we can define a compound command that wraps all ModelChanges.

This might render #3 obsolete.

christerk commented 6 years ago

The FFB communication protocol is certainly suggestive of this.

I would recommend making a CompoundCommand follow the same interface as the ClientCommand does, so it's transparent for the command handler.

SanityResort commented 6 years ago

Of course, if we implement that, it has to implement the command interface. It then simply delegates to all wrapped commands in the correct order.