ashoulson / RailgunNet

A Client/Server Network State-Synchronization Layer for Games
Other
154 stars 21 forks source link

TODO: Switch to Entity/Module Paradigm #1

Closed ashoulson closed 8 years ago

ashoulson commented 8 years ago

Entities are a standard class.

Snapshots contain: Frame # Entity Bag Events

Entity contains: Id Priority(?) BoxHolders

Has a function T GetBox() casts and returns the appropriate box from the boxholders.

BoxHolders are always stored in order(how?). BoxHolders contain typed Boxes. Each Box is end-user defined, implements Encode/Decode taking a bitpacker and potentially a basis Box (just cast it). Entity loops over all boxes and delta-serializes them.