Getting Started with Region Modules

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 10: Line 10:
 
# Get this zip file: http://www.ics.uci.edu/~lopes/opensim/HelloWorld.zip. Unzip it somewhere.
 
# Get this zip file: http://www.ics.uci.edu/~lopes/opensim/HelloWorld.zip. Unzip it somewhere.
 
# Before you go changing the code of the application, see its effect inworld by doing this:
 
# Before you go changing the code of the application, see its effect inworld by doing this:
##* Grab HelloWorld/bin/Release/HelloWorld.dll and dump it in opensim/bin
+
** Grab HelloWorld/bin/Release/HelloWorld.dll and dump it in opensim/bin
##* Start opensim as normal, and login to it.
+
** Start opensim as normal, and login to it.
  
 
You should see the word HELLO spelled out in prims, and moving every so often.
 
You should see the word HELLO spelled out in prims, and moving every so often.
Line 17: Line 17:
 
Are you ready to explore the code now?
 
Are you ready to explore the code now?
  
Hold on. Before we do that, let me give you the 30-seconds introduction to Visual C# for Java programmers. Visual C# is similar to Eclipse, if you ever used that. When it builds, it places the resulting dll or exe in whatever folder you tell it too (right-click on the project->properties). By default it places them in bin/Release. When you compile it with debugging, that goes into bin/Debug. In spirit, the dll is equivalent to a jar file. That's what you want to produce and pass around. The PDB file can be ignored, unless you want to debug. The HelloWorld example uses the defaults of VC#, so every time you build it without debugging, the dll is placed under HelloWorld/bin/Release. To build without debugging information, simply right-click on the solution in the Solution Explorer window and choose Build.
+
Hold on. Before we do that, let me give you the 30-second introduction to Visual C# for Java programmers. Visual C# is similar to Eclipse, if you ever used that. When it builds, it places the resulting dll or exe in whatever folder you tell it too (right-click on the project->properties). By default it places them in bin/Release. When you compile it with debugging, that goes into bin/Debug. In spirit, the dll is equivalent to a jar file. That's what you want to produce and pass around. The PDB file can be ignored, unless you want to debug. The HelloWorld example uses the defaults of VC#, so every time you build it without debugging, the dll is placed under HelloWorld/bin/Release. To build without debugging information, simply right-click on the solution in the Solution Explorer window and choose Build.
  
 
Another note: the solution file included in the zip is for VC# 2005. If you have VC# 2008 that's fine too. Just double-click on the solution file, and VC# 2008 will convert the whole thing.
 
Another note: the solution file included in the zip is for VC# 2005. If you have VC# 2008 that's fine too. Just double-click on the solution file, and VC# 2008 will convert the whole thing.
  
 
OK, now we're ready.
 
OK, now we're ready.

Revision as of 09:27, 15 November 2008

Hello World

This brief tutorial is intended to get people started with developing applications with/for opensim using region modules and the opensim API. The module available here writes "HELLO" in prims on every region of your opensim instance, and makes them move every 2 seconds or so. Please note:

  • The opensim API is rapidly changing. The code available here works for SVN 7176, which corresponds to opensim 0.6.0. Please use a fresh install of 7176 to run this example. The example assumes the default configuration of opensim out-of-the-box. If you try to run this example on custom configurations, you may get errors and/or warnings. Those errors/warnings can be easily fixed in the code of the example, once you understand how to work with the opensim API. But since I can't predict all combinations of configuration settings out there, the assumption here is a fresh install of opensim SVN 7176. Deviate at your own risk.

To get started:

  1. Download and install opensim svn 7176, and build it as normal. Run it once, so you create a default region and a default user. Then shut it down.
  2. Get this zip file: http://www.ics.uci.edu/~lopes/opensim/HelloWorld.zip. Unzip it somewhere.
  3. Before you go changing the code of the application, see its effect inworld by doing this:
    • Grab HelloWorld/bin/Release/HelloWorld.dll and dump it in opensim/bin
    • Start opensim as normal, and login to it.

You should see the word HELLO spelled out in prims, and moving every so often.

Are you ready to explore the code now?

Hold on. Before we do that, let me give you the 30-second introduction to Visual C# for Java programmers. Visual C# is similar to Eclipse, if you ever used that. When it builds, it places the resulting dll or exe in whatever folder you tell it too (right-click on the project->properties). By default it places them in bin/Release. When you compile it with debugging, that goes into bin/Debug. In spirit, the dll is equivalent to a jar file. That's what you want to produce and pass around. The PDB file can be ignored, unless you want to debug. The HelloWorld example uses the defaults of VC#, so every time you build it without debugging, the dll is placed under HelloWorld/bin/Release. To build without debugging information, simply right-click on the solution in the Solution Explorer window and choose Build.

Another note: the solution file included in the zip is for VC# 2005. If you have VC# 2008 that's fine too. Just double-click on the solution file, and VC# 2008 will convert the whole thing.

OK, now we're ready.

Personal tools
General
About This Wiki