Project Management

First Time Setup

Setup - Eclipse plug-in (Windows & Mac)

The Slag Syntax plug-in for Eclipse is courtesy of RiverMan Media.

  1. Download and install the Eclipse IDE (any version; "for Java Developers" is fine).
  2. Open Eclipse, click Help->Software Updates, click on Available Software at the top.
  3. Click Add Site..., type http://www.rivermanmedia.com/slagsyntax.  When it shows up on the list of sites, click the check box to the left of the root folder (which will be called the same name as the URL by default).  This will automatically check all of the boxes lower in the hierarchy.
  4. Click Install..., and click Okay if it warns about a possible compatibility issue.
  5. Click Finish, then allow it to restart Eclipse. 

Setup - Windows Command Line

  1. Download and install the latest version of the Java Standard Edition Development Kit (e.g. JDK 6 Update 16).  If you have any trouble downloading using the Sun download manager, try clicking on the filename itself (instead of the download button) to download it directly.  Java will be necessary to run ANT.
  2.  Download the latest version of the Apache ANT build system.  Save the folder (e.g. apache-ant-1.7.1) to your Program Files directory.
  3.  Add the JDK and ANT bin folders to your system path.  To do this, click Start -> (My) Computer -> Properties, find Advanced System Settings, and click "Environment Variables" at the bottom.  Find "Path" in the System Variables list, double-click it to edit it, and add something similar to the following in front of (not instead of) what's already there:
  4. c:\Program Files\apache-ant-1.7.1\bin;c:\Program Files\Java\jdk1.6.0_16\bin;
  5. Use a file explorer to make sure that the version numbers match what you actually have installed - for example, if your version of Java is jdk1.6.0_13 (as listed in the Program Files\Java directory), you'd write that instead of 1.6.0_16.
  6. Open a Command Window by clicking Start (or Start->Run on Windows XP and earlier), typing in "cmd" (without quotes), and pressing RETURN.  Type "java", "javac", and then "ant", without quotes and pressing return after each one.  The Java commands should print out some information on using Java and ANT should say "Buildfile: build.xml does not exist!".
  7. Each time you want to work on your project, open a command window and 'cd' to the directory containing your project.  You will type commands such as "ant build" (without quotes).
  8. You will need a text editor to edit source code.  We recommend Vim; for more information and Slag configuration files see our Vim Primer page.

Setup - Mac Command Line

  1. Java and ANT come pre-installed on the Mac.  All you need is a Terminal window (Applications->Utilities->Terminal).
  2. You will need a text editor to edit source code.  We recommend MacVim; for more information and Slag configuration files see our Vim Primer page.

 

Starting a New Project

New Project - Eclipse

  1. In Eclipse, choose File->new->Project.  Under General, select Project, and click Next.
  2. Name the project whatever you want, and make sure that the Location field matches wherever you want to keep the project.  Click Finish.
  3. Download the newest plasmacore.  Find it in Windows Explorer or Mac Finder and navigate into new_project/.  Copy everything in new_project to the clipboard.
  4. Navigate to the new project Eclipse in Windows Explorer (probably in C:/workspace on Windows).  Open up the folder containing the Eclipse project you just created, and paste in everything that you copied.  That project folder should now contain bin/, src/, etc.
  5. Go back to Eclipse and click on your project.  Press F5 to refresh it, and you should see that it now contains all of the pasted items.
  6. Click Window->Show View->Ant to open the Ant box (you have a lot of control over the layout of things in Eclipse, so move the Ant box somewhere convenient).  Now drag build.xml into the Ant box, and your project should show up as "game".  Click the + (or flippy triangle) button to the left of the ant build to expand it and see all of the targets.  Double click "build" to run the game.
  7. Click the project and press F5 again to refresh, and you will see that it generated the build files as well as game.slag.  You can now rename game.slag (rename is F2) and edit the first line of build.xml to match it.  Save build.xml, and now instead of being called "game" in the ant box, it will automatically change to the project name you entered.
     

New Project - Windows Command Line

  1. Download the latest version of Plasmacore.
  2. Rename or copy the "new_project" folder to the name of your game.
  3. Start a Command Prompt (run "cmd" in the Start menu) and navigate to your new project folder.
  4. Type "ant build" (no quotes) to build and launch a placeholder app.
  5. Edit src\game.slag to start programming your game!

 

New Project - Mac Command Line

  1. Download the latest version of Plasmacore.
  2. Rename or copy the "new_project" folder to the name of your game.
  3. Start a Command Prompt (Applications->Utilities->Terminal) and navigate to your new project folder.
  4. Type "ant build" (no quotes) to build and launch a placeholder app.
  5. Edit src/game.slag to start programming your game!

 

Upgrading an Existing Project

  1. Download the latest version of Plasmacore.
  2. Copy the "new_project" folder into the "upgrade" folder of your existing project (so that the path is mygame/upgrade/new_project/...).
  3. Run the default ANT task in your old project (on the command line just type "ant").
  4. The project will be upgraded to the new version of Plasmacore.  None of your source files will be erased or overwritten.

 

Using With Code Repositories

Run "ant xclean" before importing your Plasmacore project into a code repository.  "ant clean" only removes intermediate build products but "ant xclean" removes the distributable build products as well.

The Plasmacore build system will ignore the hidden ".svn" files and the like when creating distributables.