Latest  | Search | Go
Edit this page   |   Attach file 

  Home | Tutorials | Technical Reference | Runtime | API Documentation | SharpDevelopTutorial  


Using SharpDevelop With Reality Engine

This tutorial is based on the Reality 11.82 codebase.
(Author: Matt Farber, Pandora Studios)

Getting Started

SharpDevelop is a free, opensource C# scripting environment that can be easily set up to work with Reality. The benefit of using SharpDevelop? Cost, for one. There aren't many choices when it comes to C#, so you're realistically left with either Visual Studio (expensive) or SharpDevelop (free). Aside from that you will find that SharpDevelop is a very powerful program despite its competition.

Configuring For Reality

Once you've installed and started SharpDevelop, you'll want to configure it to compile your current project or start a new one. For this tutorial, I'm going to use the existing EvalKit scripts to demonstrate project creation.

Creating A New Project

  1. Go to File -> New -> Combine...
  2. Select 'Empty Project'
  3. Choose the folder where the EvalKit is located. This example assumes C:\RealityEngine\Bin\EvalKit. For the name of the new project, enter 'Scripts'

Adding Scripts

Now that you've got an empty project, it's time to fill it.

  1. Select the 'Projects' browser and right-click on the 'Scripts' project, located underneath the combine header.
  2. Go to Add -> Add Files
  3. Browse to the RealityEngine\Bin\EvalKit\Scripts folder and hit CTRL-A, selecting all the scripts.
  4. Click OK to add them.

The ScriptingSystem Library

To compile any C# scripts under Reality, you must first add a reference to the ScriptingSystem library, which contains essential functions and data only relevant to the engine.

  1. Select the 'Projects' browser again and right-click on 'References,' located underneath the 'Scripts' project.
  2. Go to 'Add Reference'
  3. Select the header marked '.NET Assembly Browser' and click on 'Browse'
  4. Browse to RealityEngine\Bin\System and select 'ScriptingSystem.dll'
  5. Click OK to add the reference.

Base Scripts

The EvalKit (and most likely any Reality module) relies on several base scripts which provide functionality like physics and effects. To compile it you will need to create another empty project under your 'Scripts' combine, which you will reference from your first project.

  1. Select the 'Projects' browser and right-click on the topmost header, marked 'Scripts Combine'
  2. Go to Add -> Add New Project...
  3. Select 'Empty Project'
  4. Choose the RealityEngine\Bin\Scripts folder. For the name of the new project, enter 'Base'
  5. Fill the 'Base' project with all the scripts located in RealityEngine\Bin\Scripts\Base using the Add -> Add Files command.
  6. Repeat the above process for adding the ScriptingSystem reference to 'Base', these scripts also need it.

Final Steps

The last thing you need to do is add a reference to the 'Base' project from the 'Scripts' project.

  1. Select the 'Projects' browser again and right-click on 'References,' located underneath the 'Scripts' project.
  2. Go to 'Add Reference'
  3. Select the header marked 'Projects' and double-click on the 'Base' project
  4. Click OK to add the reference.

You may now go to Build -> Build Combine to verify a successful setup. If the build fails you have done something wrong.

Miscellaneous

Here's a shot of what SharpDevelop looks like after finishing this tutorial, including a "Successful" message on the bottom left after running the Build command. Large Version, 1280x1024, .jpg

sharprealitysmall.jpg

SharpDevelopTutorial   Edit | Attach | Ref-By | Printable | Diffs | r1.2 | > | r1.1 | More