Improbable Icon

HTML5/JS Front-end and SpatialOS C# Back-end (JS SDK)?


#1

Hey currently looking into SpatialOS for back-end for HTML5 WebGL game. I noticed you guys don’t have a front-end library for JS to connect to SpatialOS backend.

I was wondering if you guys are working on something like this.

To be clear I’m not looking to write SpatialOS backend in JS. I can use the C# SDK for that.

I just need a JS Websocket library to connect to SpatialOS C# Backend.


#3

Hello @RyanJEC,

Welcome to the SpatialOS community! Good to see you stopping by for your questions. :slightly_smiling_face:

We indeed do not offer a JS SDK. We had an experimental one for a brief moment in the past but it was discontinued due to a relative lack of interest compared to the other SDKs that we offer. We did however recently add a low-level C API which enables you to use (with the appropriate plumbing work) any language that allows bindings to a C library.

As far as your other point goes:

I am not entirely sure if I correctly understand the idea that you are attempting to convey here. Could you maybe provide a little bit more information on what you mean by the “SpatialOS C# backend”? For clarity it might be worth referring to our glossary of SpatialOS terminology.

Kind regards,
Duco


#4

What I meant by SpatialOS C# Backend is Managed worker (server-side worker) using C# SDK and then just have a js websocket connection as a Client worker to connect to the Managed worker (server-side worker).


#5

Thank you for the clarification @RyanJEC!

So in this case there seems to be a slight misunderstanding on SpatialOS’s architecture, likely due to the traditional client-server model. Although one could implement it on top of SpatialOS, this is not a requirement.

All workers, be they managed or client, connect individually to the SpatialOS runtime, which is the back-end that you were referring to. Workers do not connect to each other.

Given that you would need a JS SDK to build your client workers this is unfortunately not possible out-of-the-box with our existing integrations.


#6

Thanks for the insight! @dvanamst you’ve been a big help.

Sad to see the JS SDK didn’t get any love from the community. Any chance of exploring JS SDK again?