|
Version 0.1.22.0 Slag is a high-level, object-oriented, interpreted, programming language developed by PlasmaWorks. Slag is designed to be light and portable while retaining the benefits of more full-featured languages like Java and C#. Slag features an implementation of PlasmaCore, a hardware-accelerated graphics API also developed by PlasmaWorks. The combination of Slag and PlasmaCore allows cross platform games development in a high-level language without sacrificing the performance traditionally associated with native applications. All RiverMan Media games are now written with Slag and PlasmaCore technology. The SlagEdit plug-in facilitates the use of Slag and PlasmaCore by providing a graphical Integrated Development Environment (IDE) built on the Eclipse platform.
The SlagEdit Plug-in currently features: Custom Slag projects with automatic setup of Slag and PlasmaCore files Syntax highlighting Auto-build with contextual error-marking Auto-completion based on project contents Automatically configured Ant scripts for building, deploying, and launching Slag and PlasmaCore projects Web-based update
The SlagEdit plug-in was developed by RiverMan Media as a tool for its developers. The plug-in itself is free for anyone to use for any purpose. However, Slag and PlasmaCore may have more restricted licensing. If you intend to use Slag or PlasmaCore for commercial purposes, please contact PlasmaWorks. Using the links below, you can download the standalone versions of Slag and PlasmaCore, along with a learning guide and API documentation. http://www.plasmaworks.com/plasmacore http://www.plasmaworks.com/slag 2. Installing SlagEdit 1. Download and Extract Eclipse SlagEdit runs on the Eclipse platform. The first step in using SlagEdit is to download Eclipse from the eclipse.org website. SlagEdit has been tested on Eclipse 3.3, but may also run on versions 3.1 and greater. Eclipse does not need to be installed with an install program. Just extract it to any directory that you choose. 2. Create a workspace When you launch Eclipse, it prompts you to enter the name of the workspace you want to use. A workspace is just a directory with sub-folders, each of which is a project. Choose an empty folder, or type the name of a new folder.
If this is the first time you've used this directory as an Eclipse workspace, you will be presented with a welcome panel. Close this panel to see the traditional workbench view: 
3. Update Eclipse with SlagEdit a. From the Eclipse menu, choose Help->Software Updates->Find and Install... b. Choose Search for New Features to Install. c. Click the New Remote Site button. d. Name the site "SlagEdit" and for the url, type www.rivermanmedia.com/slagedit e. Click OK. f. Make sure the SlagEdit site is checked, and click Finish. e. When the search results appear, expand the tree until you see "SlagEditFeature Feature x.y.z.w". Check this feature and click Next.  f. Accept the license agreement and click Next. g. Verify that you are about to install the feature, and click Finish. h. Work through the remaining dialogs and let Eclipse restart itself when prompted. You can use this same process to update SlagEdit when new versions become available. 3. Creating a Slag Project You can create two types of projects with SlagEdit: Slag Console projects, and Slag PlasmaCore projects. Console projects are intended to use the command line (such as the DOS prompt) for input and output. PlasmaCore projects can display hardware accelerated graphics and use the mouse and keyboard. To create either type of project, choose File->New->Project... from the Eclipse menu. Choose either a New Slag Console Project or a New Slag PlasmaCore Project and click Next. 
After choosing a project type, you can enter the properties for the new project: Project Name: The name of the Eclipse project to create. This will also be the name of the folder the project is stored in. Main Slag File: The name of the base file that will be created and compiled by the plug-in. Main Slag Class: The name of the class that will be created in the main Slag File. This class will either implement a simple "Hello world" program or an example PlasmaCore program, depending on which type of project you chose to create. Click Next again and the project will be created. The project will automatically be populated with all the files needed to compile, run, and distribute, your program. For a console program, your project will look like this: 
For a PlasmaCore program, your project will look like this: 
4. Building and Running When you created your project, an Ant script was generated that can build, and in the case of PlasmaCore programs, run, your project. The easiest way to run an Ant script in Eclipse is to open the Ant view. To do this, choose Window->Show View->Ant. This will open the Ant panel. The default location for this panel takes up a lot of space. You can drag it and resize it however you like. Once the window is open, Drag and Drop the build.xml that was created with your project into the new window. You can then choose to run any of the targets defined in the script. For a console project, double-click the compile target. This should open a new console window that will trace the build process. If it doesn't, choose Window->Show View->Console from the Eclipse menu. If this is your first time running an ant script in the workspace, it may take quite awhile to launch. It will be much faster in subsequent runs. 
When the project is done building, the console will display a command line that can be used to run the project. (Currently, this command line is written for the Windows platform.) Paste this command into a console window to run your program. 
PlasmaCore Projects are run in much the same way, except you can use the all Ant target, which will compile and launch the program. 
5. Working with Slag Files Basic Editing You can edit Slag files by double clicking them in the package explorer tree. This will open it in a customized version of the Eclipse text editor. You can create new Slag files by choosing File->New->File... from the Eclipse menu. Auto-Build and Errors Whenever you save a file, your Slag project will automatically be built, unless you have turned off the auto-build feature in your Eclipse preferences. If there are any problems in your project, they will show up in the Problems view, and the line in the file where the problem occurs will be marked. 
You can double-click errors in the Problems window to automatically jump to the problem in the source code. Auto-complete Every time a file in your project is saved, SlagEdit creates a table of every Type, Variable, and Method used in the project. This table is used to help automatically complete words that you type. 
To invoke auto-complete, type Ctrl+Space. Use the arrow keys to select a completion, and then press enter to insert it into your code. Press Esc to close the auto-complete window. An icon is associated with each type of completion:  | Type (Class or Aspect) |  | Method |  | Variable | Type (Class or Aspect) Method Variable Notes about Auto-Complete: Your project-must have been auto-built to generate auto-completions. When you first open a project, it will not have been auto-built. Modify and save a file to auto-build it. Only Types, Methods, and Variables that were present at the last time the project was auto-built will be included as auto-complete options. If you created a new class but do not see auto-completes from the file, make sure that a) The file has been saved, and b)Your main Slag file directly or indirectly includes the file.
6. Updating Slag Project Properties You can update your project's properties by right clicking on the project and choosing Properties->Slag Project Properties. 
From the properties page, you can update the main Slag file that the auto-builder will use when compiling. You must change this property if you change the name of your main Slag File. Note: Currently, changing this property does not change build.xml. Change the project name in build.xml to change the name of the main compile target. The Update Slag Files button can be used to update your project with Slag files (such as the Slag compiler and standard.slag) from the Slag-Edit plugin. This is useful if you have updated your SlagEdit plug-in to a newer version and want to update the files in your project. 7. Updating from Previous Versions of SlagEdit It is important to keep your SlagEdit plugin up to date with the latest bug fixes and features. When you update the plugin, it is also important that you update your project files so they are synchronized with the latest version of the SlagEdit. You can do this in two simple steps: 1. Go through the steps in 2. Installing SlagEdit to update the plugin. Note that you still select Search for New Features to Install and not Search for Updates of Currently Installed Features. This is because SlagEdit is always re-installed in its entirely, rather than being updated via patches. 2. Use the Update Slag Files feature described in 6. Updating Slag Project Properties. This will make sure that your base Slag files, such as standard.slag and game.exe are in sync with the version of the plugin you just installed. 8. Known Issues OS Compatibility Most features of SlagEdit should work on both Windows and Unix environments. However, some project creation and build operations copy platform-specific files. Please modify these to use the Slag distribution files for your operating system. PlasmaCore currently only supports Windows. 9. Change History Version 0.1.22.0, 2008.07.26 Updated to Slag Version 0.22 Updated to PlasmaCore Version 0.22 http://www.plasmaworks.com/plasmacore http://www.plasmaworks.com/slag Version 0.1.20.21, 2008.06.17 Updated to Slag Version 0.20 Updated to PlasmaCore Version 0.20 Zip archive loading http://www.plasmaworks.com/plasmacore http://www.plasmaworks.com/slag 9. Change History Version 0.1.18.18, 2008.04.06 Updated to Slag Version 0.18 Updated to PlasmaCore Version 0.18 UV Texture Coords supported Composite Images http://www.plasmaworks.com/plasmacore http://www.plasmaworks.com/slag Version 0.1.17.17, 2008.02.17 Updated to Slag Version 0.17 Updated to PlasmaCore Version 0.17 Now supports packed .exe + .etc Game data (images etc) should now be stored in /data instead of data/res http://www.plasmaworks.com/plasmacore http://www.plasmaworks.com/slag Version 0.1.12.6, 2008.01.24 Updated to Slag Version 0.13 Updated to PlasmaCore Version 0.07 Sound support added to PlasmaCore. PlasmaCore build files streamlined. Now use the "all" target instead of the "run" target to build and launch a PlasmaCore project. Added Section 7, Updating from Previous Versions of SlagEdit, to this document. Version 0.1.12.6, 2008.01.19 Updated to Slag Version 0.12 http://www.plasmaworks.com/slag/slag_change_log.html Updated to PlasmaCore Version 0.06 http://www.plasmaworks.com/plasmacore/pcore_change_log.html PlasmaWorks has changed the Slag naming conventions so that type names are always capitalized within method and var names while preserving wide_name conventions - to_string is now to_String, newColor is new_Color, etc. PlasmaCore now supports joystick events. Version 0.1.10.5, 2008.01.13 Updated to Slag Version 0.10 http://www.plasmaworks.com/slag/slag_change_log.html Updated to PlasmaCore Version 0.05 http://www.plasmaworks.com/plasmacore/pcore_change_log.html Note: This version of PlasmaCore now supports changing certain execution settings through a file called "data/settings.txt" in the distributable and "data/res/settings.txt" in the source. This file is also copied by build.xml. If you are upgrading your plugin but using an older project, settings.txt will not create, and build.xml will not copy it properly. You will need to create a settings.txt file and alter your build file to copy it into the distribution. For an example of how to do this, simply upgrade your plugin version, create a new Slag with PlasmaCore project, and alter your build file to handle settings.txt in the same way that the example project does. (You will probably need to add a line to copy the file, and add a line to exclude it during another part of the copy.) Version 0.1.9.3, 2007.12.17 Updated to Slag Version 0.09 Updated to PlasmaCore Version 0.03 Version 0.1.8.2, 2007.11.07 Initial Release |