Get SpatialOS

Sites

Menu
You are viewing the docs for 11.0, an old version of SpatialOS. 12.0 is the newest →

The JavaScript worker SDK is currently experimental. We're very open to feedback --- don't hesitate to get in touch on the forums.

JavaScript worker SDK

Note: For the time being, only local development is supported, as JavaScript workers cannot connect to a remote deployment. Additionally, managed workers are not supported, so no worker assemblies are produced by the build process.

The JavaScript worker SDK allows anyone to write a worker in JavaScript to connect to a SpatialOS simulation. Like any other worker, a JavaScript worker can subscribe to information from a portion of the simulation, visualize it, and/or perform some computation for the entities it isauthoritative against.

A typical JavaScript worker makes use of both the API defined in the spatialos_worker_sdk package, and the generated code based on the user-specified schema.

Requirements

  • npm 3.10.10 or later is required for the default npm-based build. NPM is bundled with NodeJS, and we currently test using NodeJS 6.9.5, bundled with npm 3.10.10. To easily control which version of NodeJS you’re using, we recommend using nvm.

  • An up-to-date version of Google Chrome or Firefox.

Getting started

To get started, take a look at the usage guide, which takes you through setting up and building a worker using JavaScript.

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums