Guides/Scripting Guide

From Sirikata Wiki
Jump to navigation Jump to search

Introduction Scripting

Welcome to the application developer's guide. If you want to connect to a Sirikata world and script objects, this is where you should start.

Currently, the primary scripting language for Sirikata worlds is Emerson, a derivative of JavaScript with features designed specifically for virtual worlds. This guide will teach you how to connect to a Sirikata world and script objects in Emerson.

Navigating the Guide

This guide is broken down into two major components: :ref:`emerson-tutorials` and the Emerson api. The tutorials will get you started, letting you start writing code with no previous experience with the system. The language reference is useful once you know your way around the system but need to know specifics -- what is the exact syntax and options for sending messages? or how do I dynamically create new objects?

For a beginner, we recommend starting with the :ref:`emerson-introductory-tutorials` to get a feel for how the system works. Then, to better understand the system and the language, learn the :ref:`terminology` used throughout this documentation, as well as basic JavaScript syntax, most of which Emerson borrows directly (e.g. expressions, conditionals, loops, functions, object and array literals; some good references, ignoring web-specific features such as DOM access, are these tutorials and a description of how to use classical inheritance)

At that point, you should be familiar enough to start writing your own, novel applications. Of course, through additional tutorials and the language reference, you can learn about more features of Emerson and the system.

If you get stuck or are unable to find the answer to a question in these guides, try the emerson-users mailing list. Be sure to search before posting a new question.

Head over to the :ref:`emerson-tutorials` to get started.