Open alee opened 3 years ago
maybe organize the functionality around ECS (using existing role / session ids)
Using colyseus's schema codegen we should have a cleaner codebase and avoid manually picking apart the schema changes to rich objects so we can issue the appropriate vuex store mutations (e.g., no more onAdd/onRemove/onChange for every ArraySchema property in an object).
Creating proper classes with annotations and running the codegen should get us started but we will punt on this and refactor after the September tournament.
Colyseus 0.14+ changed the way that data is automatically synced between the server and client. Our code would be much simpler if we flattened our data structures from nested class hierarchies to so we would have something like this instead:
or something along these lines so colyseus can do more of the heavy lifting synchronizing the smaller scalar values
https://docs.colyseus.io/colyseus/migrating/0.14/#onchange-on-schema-references