Paperworld3D v0.1 Installation tutorial
To set up a Paperworld3D project you need to use several programs, which might be partly new for the average Flash developer. Since I know this makes it kind of hard to set up a project for the first time, I wrote down all the steps which I've taken to get the demo files up and running on my local machine.
Follow these steps exactly and you are able to get it all running too!
[NOTE] I'm using Windows XP, I'm not sure if all these steps are the same on Vista and Mac (Let me know!).
Step 1: Installing JDK 6
The Paperworld3D server is based on Red5, which is a Java based communication server. Later on we need to compile some Java code, so we need to install the JDK 6 (Update 6 used in this tutorial) which can be found here: http://java.sun.com/javase/downloads/index.jsp
After you've downloaded the installer you can install Java by just using it's defaults. It's safe to click next till you get the message that you've finished the installation.
Step 2: Installing Eclipse
I'm pretty sure every Flash developer knows about Flex Builder, which is build on top of Eclipse. In this case we will not use Flex (although it is possible, in this tutorial we won't use it).
Eclipse is a very useful tool which can be used to manage your Java projects, but it can also manage you Actionscript projects when you've installed FDT (see next step).
Go to http://www.eclipse.org/downloads/ and download the latest classic version of Eclipse (Eclipse Classic 3.3.2 is used in this tutorial). Eclipse is distributed for windows as a zip file. After you've downloaded the file you can unpack it to any location on your pc and run eclipse.exe. There's no installer for this program. I recommend unpacking it to c:/Program Files/Eclipse/ and copy a shortcut of eclipse.exe to your desktop.
Browse to the unpacked location and open eclipse.ini. Change the setting on the last line to -Xmx512m, to set Eclipse's memory limit to 512 MB instead of 256 MB. This is needed in order to run FDT properly.
Step 3: Installing FDT
Flash Development Tools (FDT) is a plug-in for Eclipse. In order to install the FDT trial, you need to start Eclipse. After it's launched, it will prompt you the question which workspace to use. For now, just press ok. During the first run you'll see an Eclipse welcome screen, this is not needed too, so it's safe to close it.
Go to menu -> help -> Software Updates -> Find and Install and select "search for new features to install”. Add a new remote site, name it FDT and give it the url: http://fdt.powerflasher.com/update/ Press ok, and make sure FDT is checked. Click on the finish button to connect with the update site. Check FDT (default not checked!) and press next. Accept the license agreement and press next again. The new plug-in will be downloaded.
Step 4: Installing Subclipse
Subclipse is an easy to use SVN plugin for Eclipse. This makes it possible to sync up with the Paperworld3D version on Google code.
Again we need to go to menu -> help -> Software Updates -> Find and install and select "search for new features to install”. Add a new remote site and name it Subclipse with the following url: http://subclipse.tigris.org/update_1.2.x Make sure Subclipse is checked and click on finish. Expand Subclipse and make sure Subclipse Plugin is checked. When you also check Integrations you'll probably see a plug-in error. So don't check this one. Press next, accept the license agreement and press next again. The new plug-in will be downloaded.
Step 5: Installing Tortoise SVN
Although it is possible to get Paperworld3D's source code with Subclipse, I personally prefer downloading these files with a separate tool. This way we do not have to set up a new SVN project with Eclipse. I only want files in my workspace which are actually relevant for building a project.
Go to http://tortoisesvn.net/downloads/ and download the latest version of Tortoise SVN (Version 1.4.8 used in this tutorial). Installation can be done by clicking next till you get the message that you've finished the installation.
Step 6: Installing Red5 v0.7 (Java 6 version)
The server part of Paperworld3D is build on top of Red5. So you'll need the right version of Red5 to use Paperworld3D. Currently this is only Red5 v0.7 (Java 6 version is used in this tutorial). You can download it from: http://osflash.org/red5/070final
When you don't have an older version of Red5 installed, you can press next until you're finished again. If you have already installed a previous version, I recommend selecting a different directory to install Red5 to. I don't know if v0.7 is backwards compatible and if it will break any of your other code.
Step 7: Install Flex SDK
Flex SDK makes it possible to compile Actionscript code from the shell, so you can use any IDE of your choice to edit the code. Later on we will use Ant to build the project for us.
Go to http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3email and download the SDK from the bottom of the page. Please do not confuse this with Flex Builder.
Flex SDK is distributed by a zipfile, which can be unpacked anywhere. Unpack it and remember the location for use later on.
Step 8: Download Paperworld3D source
Paperworld3D is hosted by Google code. We can download the latest version by using SVN. Create a folder anywhere on your file system where you want to have the Paperworld3D source. Right click this folder and select SVN checkout. Add the SVN address here, which is http://paperworld3d.googlecode.com/svn/trunk/ Press ok, and wait for a while until all the source files are downloaded.
Step 9: Setting up Eclipse
Now we have downloaded and installed all the software we need it's time to configure Eclipse so it will work properly. First of all we need to set the right JRE, which needs to point to the JDK. Go to Window -> Preferences -> Java -> Installed JREs. Press add and browse to the location where you've installed the JDK. This is probably C:\Program Files\Java\jdk1.6.0_06 Press ok, and check the JDK we've just added.
Change from Java -> Installed JREs to FDT -> Core Libraries and go to the tab AS3 Core Libraries. Press Fast Add and select Flex 3 SDK and browse to the unpacked Flex SDK directory. Press ok and select the added Flex 3 SDK.
Step 10: Create a new server project
Go to file -> new -> Java project and enter a project name. You are free to give it any name you want. I would name this paperworld_server myself. Select the option to create a project from existing source and browse to the folder where you've downloaded the Paperworld3D files, go to tags\paperworld3d-0.1\src\server (During this tutorial I'd advice not to use the version located in Trunk, since that code is under development and might be broken) press ok, and next. Go to the libraries tab. Select red5.jar, edit it and let it point to your red5.jar, which can be found in the root of your red5 installation. Press finish and wait till your project appears in the Package Explorer panel, which can be found on the left of Eclipse.
For later convenience, right click on your project -> team -> cleanup. This prevents problems later on when you want to synchronise with the SVN server.
Step 11: Configure a server
Configuring the server is really easy. Open build.xml which is located in the root of your just created project. Change the location of red5.dir on line 19, to your local Red5 installation directory. This is probably C:/Program Files/Red5.
Step 12: Build a server
Building the Paperworld3D server can be done by Apache Ant. This is already built-in in Eclipse. Ant is basically a tool to batch instructions like make directories and compiling a whole project.
Go to window -> show view -> Ant to open this panel. Click on the + icon to add the build instructions file. Expand your project and select build.xml. After doing this you see "build-paperworld” show up in your Ant panel. Double click it and you will see some compiling happen in the console window. When you followed each step it will end up with the message: "BUILD SUCCESSFUL”. Go to your Red5 folder/webapps/ and you'll see a new folder named paperworld3d. This is the compiled server which can be used by Red5.
Step 13: Create a new client project
New Paperworld3D client projects can be managed by FDT. Paperworld3D is developed using this tool, so for now it is much easier to set projects up with FDT. Most of the settings are already predefined.
Go to file -> new -> other -> Flash -> Flash project and press next. Give the project a name, paperworld_client for example. Uncheck the default location and browse to the folder where you've downloaded the Paperworld3D files, go to tags\paperworld3d-0.1\src\client. Press ok and make sure your project language is set to Action Script 3 and you have "Flex_3_SDK_0” selected in the drop down box. If your drop down box is empty, make sure you have followed each instruction from step 9 and try again. Press finish and wait till you new project appears in the package explorer, next to your server project.
Probably Eclipse will throw some "java.lang.NullPointerException” errors. Just ignore these and press ok when prompted. This is caused by some linked source folders, which are not available.
[NOTE] There are about 20 errors in the problems panel. Normally it's not a good idea to ignore errors, but in this case you should. FDT thinks there are some errors in de Papervision3D code. Since we will build our project with the Flex SDK in step 15, we can ignore these errors.
Step 14: Configure a client
Browse to your Paperworld3D folder with your regular file explorer. Browse to tags\paperworld3d-0.1\src\build and open user.properties in a text editor. Change FLEX_HOME to the Flex SDK directory which we've created in step 7. Change RED5_HOME to your Red5 installation folder from step 6. Save this file and you are finished configuring the client.
Step 15: Build a client
Building or compiling your Actionscript code will be done a little differently then you are probably used to. Although we have installed FDT which can normally be used to compile your code, we will use Ant for the client as well. Build.xml contains a lot of instructions to generate the compiled code with the right file structure.
Go to your Ant panel and press on the + icon, to add a new instructions file. Select your client project and select build.xml. Press ok and you will see "build-paperworld” added to your Ant window. Double click build-paperworld to build the project. This can take up to a minute and ends up with the message "BUILD SUCCESSFUL” in the console panel.
Browse to your Paperworld3D folder tags\paperworld3d-0.1\deploy and check the modified date of index.swf. You should see it's changed in the last few minutes.
Step 16: Change local security settings
In order to run Paperworld3D locally we need to set the Paperworld3D client folder to trusted, so it is able to load modules from your local file system.
Browse to C:\Windows\System32\Macromed\Flash\FlashPlayerTrust and copy paperworld.cfg to it, which can be found in the Paperworld3D folder under tags\paperworld3d-0.1 Edit the copied file and add the path to your local deploy folder. This folder is located next to the original paperworld.cfg. The default cfg file contains two folders. You will be okay with just having one. Save the file and you are almost ready to launch Paperworld3D!
[NOTE] I noticed you only have the FlashPlayerTrust folder when you have installed the Flash IDE. If you have not installed the IDE, you should a) install it, or b) run your files from a local webserver or c) find out an other way to do this and let me know.
Step 17: Launch Paperworld3D
After all these steps launching should be really easy. First of all we need to start our Red5 server. Browse to your local Red5 folder, go to wrapper and launch Red5.bat. A command prompt window will popup and within about 10 seconds it should say: "Startup done in: xxxxx ms”. Now we have our server running!
Browse to your Paperworld3D folder tags\paperworld3d-0.1\deploy and run index.html in your default browser. Probably you will see within a few seconds a spaceship, spacestation, a red planet and some stars. If everything works fine you can use your keyboard (w move forwards / s move backwards) to control the spaceship and fly (open a second browser to fly multiplayer!)
When your server is not running, or not running properly you can only move just a little bit.
It's also possible that your screen will be blue and you don't see anything at all. In that case you should check the previous step. Probably something is wrong with your local security settings.
Step 18: Debug Paperworld3D client using Xray
Since Ant will build your project it's kind of hard to trace debug information later on. You can use Xray to send debug information over a local connection, from your application to a Xray interface.
Xray can be downloaded from http://osflash.org/xray In this case we only need the Xray Interface v2.0 (swf only). Xray's source code is already included in the Paperworld3D distribution.
When you run Xray.swf and Paperworld3D's index.html you will see a lot of ouput scrolling by in your Xray output panel. If not, make sure the option "Show Output” is selected. In my version it was unchecked by default. Xray's connection error at the startup of Xray can be ignored.
Step 19: Develop your own multiplayer environment
In a later tutorial I will describe how you can set up a completely new project. If you want to set up a project I'll advise to have a good look at the deploy folder and see how everything is currently working.
Have at least a look at the config.xml file in the conf folder, as well as all the files in the games folder. These are really important files!
I hope this tutorial helped you setting up the default Paperworld3D installation. Leave some feedback if it did! When you think this is incomplete or incorrect, please also leave a message so I can update this page when necessary.
Have fun!

[…] PaperWorld3D es una herramienta que pinta bien, sin embargo aún esta en sus etapas iniciales y no hay muy buenos tutoriales aún.
Sin embargo ya esta disponible para que te la bajes y trates de sacar proyectos adelante, igual y tú eres uno de los primeros en escribir un tutorial chido!. Por lo menos hay algo de instrucciones para de cómo crear y configurar un proyecto. Y un tutorial de cómo instalarlo y dejarlo corriendo. […]
[…] you want to start experimenting with it can read the great post by paultondeur on his […]
Great tute!
I have Red5-0.7 runnong on a Fedora box but I’m using JAVA 5 rev11. Does Paperworld3D require JAVA 6? Or am I good as long as I’m running Red5.0.7?
-Jason