
Now that the Manhattan Project has taken its first few baby steps, I think it would be best if I made a series of tutorials for those who want to keep up with the happenings, but might have lagged behind. This is the first in a large series of tutorials that I (and all those involved) want to have available to help those who have a little trouble getting started.
To get some things straight, at least for myself, OpenSim is not a client for Second Life (I swear, this is what I thought before I got into it). OpenSim is a open source server-side application for running grids and single regions, and you will be able to connect to your region / grid via the Second Life client. So basically, you'll be able to host your own capable sandbox.
Now, with that said, I do want to give a couple words on how I feel you should use these tutorials:
- Learn from my mistakes. I'm nowhere near a genius, nor do I claim to have superior knowledge on the subjects I'm going to walk you through. I'm giving you a face value representation of what worked for me.
- If you think you can get through some of these steps on your own, then do it! Honestly, I want this tutorial to be as straightforward as possible, but I also want you to explore your own ability. You'll get a lot more satisfaction if you take the time to do what you think you're capable of without the full description. AS A RESULT: I'm going to bold the main goal of each section in Bold. I'll go more in depth in regular font.
- Don't expect my tutorials to get you through things on the same timeline as the project. I'm going to stagger them past the week that they were expected.
Okay, with all that out of the way, let's get you started (and hopefully finished too!)
As much as I hate to do this, I'm going to make the following assumptions:
- Have a version of C# installed. If you don't have this, follow this link and follow the tutorial, except install C# Express instead of VB Express.
- Have TortoiseSVN installed. If you don't have this piece of software, you can download it here.
And one final reminder: If you get stuck or for some reason your OpenSim starts having errors, just delete the folder and start over. I promise, I did have to do it at least once.
Okay, lets get started.
1. Set up a folder to download the source using TortoiseSVN.
I just created a new directory on my C drive called OpenSim. Next, Right-Click that new folder, and if you have TortoiseSVN installed you should see the option SVNCheckout....
In the window that appears, set the URL of Repository to http://opensimulator.org/svn/opensim/trunk and click Ok.
This'll start a long download process, that will hopefully yield a success screen. Hit Ok.
2. Generate a Solution File, then compile OpenSim.
Try not to overcomplicate this for yourself. It really is this easy.
First, you will have to run a batch file to generate a solution file so that you can open the project in C# (Express or whichever). From what I read, it said it is necessary to run this as Admin in Vista, but I didn't have to. In fact, it didn't seem to work if I tried to run it in Admin. Maybe I'm a noob.
If you are compiling for C# 2005, run the runprebuild.bat batch file. If for 2008 (which is what I did) use the runprebuild2008.bat which you will find in the base directory that you downloaded the source into. It will open a command line and run for a short bit. The result is an OpenSim.sln file in the base directory you downloaded the source into.
Open the OpenSim.sln file. It will take a small amount of time to load all of the files, and then all you have to do (believe me, at this point I was scared of what I'd have to do to get this to compile...) is select Build -> Build Solution. Give it some time, then it should say 63 Succeeded in the output window in Visual Studio. Go ahead and close Visual Studio, if you're like me, you want to do it sooner than later to avoid breaking the code somehow magically.
3. Configure OpenSim.
There are only a few steps necessary to get OpenSim running. But honestly, having OpenSim running does not give you much until you actually connect.
Firstly, browse to the bin directory inside the base directory where you downloaded the source. Find and make a copy of OpenSim.ini.example and name it OpenSim.ini. Open OpenSim.ini and add ; to the beginning of the line:
storage_plugin = "OpenSim.Data.Null.dll"
remove the leading ; from the following line:
;storage_plugin = "OpenSim.Data.SQLite.dll"
Editing those previous lines allows your built prims to be saved to a SQLite database instead of vanishing every time the server restarts.
Finally, just after the first line of the file, add the following line:
physics = OpenDynamicsEngine
Skip the mistake I made: If you don't add this line to the OpenSim.ini, everything will still run fine. The issue is that when you start to build prims and try to walk on them you will not be able to. The physics engine has to be in place for you to be able to walk on prims.
That's all for configuring the ini file!
4. Run OpenSim!
Skip the mistake I made: It might be fairly obvious to you, and almost expected if you do a lot of Unix / Linux installs, however I didn't realize at first that the OpenSim was asking me more questions when I ran it for the first time. I was trying to enter in different commands and whatnot, and this fatal error led to my first restart :(
Note for Vista Users: You will need to run this in admin mode. I found it easiest to make a shortcut on my desktop to the exe that had Run as Administrator specified.
In the bin directory, run the OpenSim.exe. After a little loading, it'll ask you some initial questions. I recommend hitting enter to use the default answer on all of these except:
- Region Name - Give it some unique flare, this is the name of your area!
- External Host Name - If you are going through a router or firewall, make sure port 9000 is forwarded to your machine that the server is on. Also, set this value to the external IP for your network. (If you are not sure, try http://www.whatsmyip.com to find it out)
- First, Last, and Password for Master User - Set these to what you want to log in as.
After these are through, you are ready to configure a shortcut to connect your Second Life client to your new region!
5. Connect to your server!
Copy your shortcut to Second Life, then right-click it and select Properties. Add the following lines to Shortcut Target:
-loginuri http://127.0.0.1:9000/ -loginpage http://127.0.0.1:9000/?method=login
Using the information you provided for the master user, log in!
Warning: This is a warning from the OpenSim's connecting page, thanks FDG!
One source of problem - like uploaded pictures not showing or not being able to move directly after logging in into a public grid - is having the "Maximum Bandwidth" setting in the Preferences of the SecondLife viewer on the "Network" tab set too high. So set it to about 250 kbps, when you encounter such issues.
http://opensimulator.org/wiki/Connecting
6. Final Notes
Okay, so you got it running, but just remember this: type quit and hit enter in the server command line when closing down. This will prevent errors with your sim!
And Finally, here are the resources used to help me get my sim up, as well as credit where credit is due.