Endel Dreyer

Results 308 comments of Endel Dreyer

hey @Mykybo, that's odd, because the `SchemaSerializer` is used by default, it shouldn't be necessary to use `@serialize(SchemaSerializer)`. How does your room handler and schema look like? Cheers

@Mykybo If you're assigning anything that isn't an instance of `Schema` on `this.setState()`, you'll see the error you've mentioned (`SchemaSerializer error. See: https://docs.colyseus.io/migrating/0.10/#new-default-serializer.`) You should do like this: ```typescript import...

@Mykybo I see, you're not supposed to use `colyseus` by cloning it. You should install it as a module (`npm install --save colyseus`), and import it from the module rather...

I see @Mykybo, many people had issues when using Babel, see: https://discuss.colyseus.io/topic/92/colyseus-js-server-error-registeredhandler-klass-is-not-a-constructor/9 and [other posts](https://discuss.colyseus.io/search?term=babel&in=titlesposts) You may be able to run it if you transpile `node_modules/colyseus/lib/*` files too, I haven't...

@Mykybo yeah you're right, we need to support it. It currently works in the front-end with `colyseus.js`, but not in the back-end with `colyseus`.

I've been playing around with this today, and I've managed to get rid of the `SchemaSerializer error` using this configuration: https://github.com/endel/coly-test/commit/c45d9d1ce6ce16b7a5db7b16f4f88ac6c599ce8e The problem is deeper than it seems, though. Babel...

A pull-request landed recently on Babel to improve some legacy decorators stuff https://github.com/babel/babel/pull/10616 I've updated the test scenario for the latest versions (https://github.com/endel/coly-test) and the same error (not synching state...

Hi @dengzhaofun, `Date` is not supported as a type. You should use a timestamp instead. e.g. `Date.now()` or `date.getTime()`

Supporting `Date` in the future would be nice indeed, let's keep this issue open until we have it!

I'd prefer sending dates as number/unix timestamp rather than strings @vitalyrotari: ```typescript class State extends Schema { @type("number") timestamp: number; } const state = new State(); state.timestamp = Date.now(); //...