Getting Started with ARES Development
Setting up the ARES SDK and a viable build environment
Development of ARES-compatible software and devices is easiest when using the Software Development Kit (SDK). This is a collection of scripts and headers that defines a number of APIs and convenience macros.

Prerequisites


  1. A working build environment:
    1. The Firestorm viewer,
    2. Another viewer with Firestorm's build features, or
    3. a working LSL-PyOptimizer build environment (diehards only)
  2. (optional) The Notepad++ editor, or another programming text editor capable of supporting custom syntax highlighting. NP++ is recommended as the SDK includes a UDL XML preset for it.
  3. Your own copy of ARES. Access to a friend with ARES is not generally sufficient except when developing remote control devices and furniture.
  4. The ARES SDK archive. The latest version can be obtained here, or (if you are familiar with Git version control), with git clone https://github.com/rhetorica/ARES-SDK.git

Setting up the SDK


  1. If you are using Firestorm's preprocessor and have never set it up before:
    1. Open Preferences › Firestorm › Build 1
    2. Turn on Enable LSL preprocessor
    3. Turn on #includes from local disk
    4. Create a directory in your local filesystem to serve as the includes path, and specify it in the Preprocessor include path directory. The ARES SDK should be installed in this directory. It is best to avoid spaces in the path name. Some possible paths meeting this requirement are:
      1. D:\LSL
      2. /Users/Mary/SL/scripts
      3. /home/root/stop-logging-in-as-root/lsl

  2. If using Firestorm's preprocessor, the following checkboxes must be enabled in Preferences › Firestorm › Build 1:
    1. Enable LSL preprocessor
    2. Script optimizer
    3. #includes from local disk

    The features switch() statement and Lazy lists are not used in any ARES SDK code, but may be enabled at your discretion.
    It is also worth setting your Default Creation Permissions. These values are sane and usually what you want:

  3. Extract the SDK into your includes directory. The file utils.lsl should be directly in this directory, not under a subdirectory such as ARES-SDK-main.

  4. If using Notepad++, install UDL/LSL (ARES).xml by opening the menu Language › User Defined Language › Define your language... and pressing the Import button.

  5. Test for successful installation by compiling the following script. If you are using LSL-PyOptimizer, this needs to be done manually on disk (and you are probably already familiar with the process); in Firestorm, you can simply attempt to compile it:
    	#include <utils.lsl>
    	default {
    		state_entry() {
    			echo("Hello and welcome!");
    		}
    	}

Troubleshooting


  1. If LSL-PyOptimizer or Firestorm can't find <utils.lsl>, make sure you installed the ARES SDK directly into your designated directory for includes, not under a subdirectory. GitHub automatically wraps the tree in a directory called ARES-SDK-main, which must be stripped for proper installation.
  2. If you're not using Firestorm, you'll need to paste the contents of LSL-PyOptimizer into a script in SL to actually compile its output. Of course, if you're using both Firestorm and LSL-PyOptimizer, you can simply #include the parsed file, which is recommended practice for programming in Firestorm anyway.
  3. If the #include line in the example above generates any other error, repeat the Firestorm configuration process. As of this writing, no other viewer has an embedded preprocessor.
  4. During typical usage, LSL-PyOptimizer produces a warning message about an illegal control character (0lx7f) when parsing the ARES pipes.h.lsl header; this is expected. The character is not actually illegal in LSL, and is vital to proper message passing.

Next: Basics