since I mainly work in the fields of SAP I am considering an own tool for emulation of conveyor systems.
We need a tool that can interact with PLCs and simulate boxes or pallets going through photo sensors or passing barcode scanners.
SAP Extended Warehouse Management comes with its own MFC (material flow controller) that communicates with the PLCs. PLCs get information from sensors like barcode scanners, etc.
Such scanning point are considered control points where the PLC needs routing information from MFC.
After having recieved this information via telegramm, PLC triggers a drive like a conveyor“s motor.
What i want to achieve is pretty much like a āmulti-player gameā that only shows the current status either in 2D or 3D in an arbitrary number of clients. Client-side interaction is not necessary.
Current status in this case means which pallet with which ID is where in the system.
Simulation (like the movement of palettes on conveyors or the events when a pallet passes a scanner) needs to run on a server that has a connection to the PLCs. Whenever anything changes, Server has to send update information to all connected clients accordingly.
What I couldn“t solve so far ist the following:
Is Node.js the best way to do the server-side stuff from a babylon.js point of view?
Can I model the system in a different way and just use coordinates in comination with a jpg-layout of the system?
What (other) advantages does babylon.js offer to get all this achieved?
Pushing from the server to the clients or should the clients pull from the server?
Actually I need a point of entry. Any help appreciated.
We are pretty agnostic regarding server side technology but I would probably recommend Node.js just to keep the same language on both side
We have several games already using this technique.
Keep in mind that babylonjs would be mostly for client side (even though you can also use it server side to run simulation for instance but that does not seem to be your need here)
Language wise we support either JavaScript or typescript
TLDR: having node.js sending data using websocket to multiple bjs clients is not a problem and was already done multiple times
But how does it work, when a client creates a new BJS-object client-side?
Let“s say I have my conveyor-setup renderend in two connected clients A and B based upon information
that comes from the backend. So every client would see the same scene and āthe sameā BJS objects.
Now, client B creates a box in BJS (e.g. a simple pallet) via button.
How does it work that in client A“s scene the box appears as well?
I think I“m completely wrong and when client B presses his button, i have to let the server know that I want to spawn a box with width = xxx, height = yyy and length = zzz at position = (a, b, c) and broadcast these information to all clients so that every single client can do its BJS-stuff by itself, right?
Hi @Topper. Some of these questions are best asked on the Colyseus forum or Gitter chat (the core developer Endel Dreyer is very responsive).
Thereās a number of ways to use the framework depending on the application but itās recommended that all state management be done by using Colyseus as an authoritative server. Clients send requests and Colyseus server mutates the state and broadcasts change patches (changed state variables) to all clients which then render the updated state. State changes are not recommended directly on the client.
Iāve probably botched some of the terminology but thatās the general gist as I understand it.
Iām working on a non-game application that started with the boilerplate. Iām not aware of what else the boilerplate has been used for.
Thereās the BJS Shell Shockers multi-player first-person shooter which uses node, express and websockets on the server side, just like Colyseus but I think that game predates a stable Colyseus release and they rolled their own multi-player server code.
I“m trying to get along with this boilerplate which turns out to be a time-consuming thing bc documentation is not noob-level (actually what i would would need).
I got the webpack-dev-server for the clients and the web socket server to spawn.
When i start the client app in the browser i can see this well known BJS scene.
But I“m getting this in the browser“s error log:
Hi @Topper ⦠looks like a bug in the latest version. I replicated your reported issue, reported to Endel and he was able to replicate also and is looking into it. Iād encourage you to ask Colyseus or boilerplate related questions on the Colyseus chat or forum.