Hi @rafaelbeckel, welcome!
That's the first time I see this, I've found this by googling the error:
sudo npm install --save colyseus.js --unsafe-perm=true --allow-root
Not sure why this happened to you though. Cheers!
hi @hlarcher, welcome!
will I be able to reproduce just with the code you provided? I don't see you mutating much on the State for this error to happen. I'd appreciate if you can provide a simple client + server on GitHub so I can inspect this problem further.
This error (
TypeError: Cannot read property '_schema' of undefined) indeed does happen sometimes, and it's quite difficult to track down. It usually happens when the encoder is not doing its job properly (or doing it in a not so intuitive way)
ArraySchema does not support multi-dimensional arrays. The general suggestion is to use a 1D array and treat is as 2D when iterating on it. Please check this reference: https://softwareengineering.stackexchange.com/questions/212808/treating-a-1d-data-structure-as-2d-grid
Live demo: https://babylonjs-multiplayer.herokuapp.com/
Also added a very simple movement controls for the player, without any smoothing or prediction. Feel free to use it and improve it to fit your needs!
Hi @Givo, I'll update that example tonight, thanks for letting me know about it. Cheers!
This module is very famous for having multiple transport layers for logs: https://github.com/winstonjs/winston
Maybe you can use it during your room lifecycle. I've never used it though, so I can't give more detailed information
Hi @Givo, please pull the latest version and run
I've just removed the
bundle-colyseus-client command. The examples are now getting the latest version of the client from the
colyseus.js dist file. The recommended way is to use the client as a module though.