You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This tutorial will cover the web packaging process, allowing you to run your finished Torque 3D projects inside a web-browser. All you need is a working Torque 3D project
(we'll use the FPS Example for this tutorial) and a website to host your packaged files from.
Getting Started
Open the Torque 3D Toolbox. Windows users can do this by launching the program from the Start menu.
Make sure the Projects tab is selected.
Select the FPS Example project by clicking once on its picture in the list on the left hand side.
(click to enlarge)
To make sure the project is ready to go, play it in our web browser.
With the FPS Example still selected, press the Play in Web button.
(click to enlarge)
Package Project Dialog
Now we're ready to package up the project for others to download and
play. Open the Package Project dialog by clicking on the Package Project
button in the Toolbox.
Inside the Package Project dialog, check the Web box under Target Formats
and either the Windows or Mac box under Target Platforms (depending on
which platform you're using).
All the other boxes should be unchecked.
(click to enlarge)
For now, we will keep the other values at their defaults, but we'll
cover what they're used for in case you want to change them later.
Destination URL - Used to load the game after the player downloads and installs your plug-in.
Name - The final name of your game.
Target Location - The folder where your packaged web project will end up.
Packaging Advanced Settings
Select the Configure button next to the Web Target Format label to open the Packaging Advanced Setting dialog to the web tab.
(click to enlarge)
Buttons
Before you change any values, you need to understand the buttons near the bottom of the dialog and the order to use them in.
(click to enlarge)
Load from File - Loads all the fields in this dialog tab
from your project. This will overwrite any changes you've made with
whatever is currently saved in your project files, so don't do this
after editing the values unless you want to revert your changes.
Save to File - Saves all the fields in this dialog tab to your project. Do this after you make any changes to this dialog you want to keep.
Generate Source Project - After you save your changes,
you need to re-generate the source project to reflect those changes.
Note: If you have any of your project source files open in any other
editor, close them before pressing this button.
Open Source Project - After you make changes to your
Source Project, you need to re-compile your project. This button is a
shortcut to reopen your source project. Make sure everything builds
properly before continuing.
Every time you make a change
Every time you make a change to any value in this tab you must following steps 2-4 above.
General
We're not going to change any of the General settings right now. But
we'll go over the values since you'll want to change them for your own
projects.
Company Name - Your company name. Used for copyright.
Company Key - Used to organize the plug-in location on the host machine. This should be an alphanumeric string with no spaces.
Plug-in Name - Name of the plug-in in the resource file.
Product Name - Name of your project.
Version - The project version number. When you release an update, increase this value. Note: This must be a number, otherwise your project will not build.
Description - A short description of your project.
Firefox/Chrome/Safari
MIME Type - The 'Multipurpose Internet Mail Extension'
used by many browsers to identify which plug-in should be used. Unless
you register your MIME type with the Internet Engineering Task Force it should be an alphanumeric string which starts with the preface "x-".
Safari Identifier - Identity used by the Apple Safari browser. This is a fully qualified domain name to your project, but in reverse order to what you would normally enter into a web-browser (e.g. com.mycompany.myproject).
Internet Explorer
Internet Explorer requires additional Universally Unique Identifiers (UUIDs) for certification. Unless you have a specific reason to enter your own
values, you should use the ones provided by the Generate UUIDs button.
App UUID - Application id.
Web Game UUID - Id used to define the interface between client (the browser) and server (the project).
Web Ctrl UUID - Id used by the web based controller.
Web Game Lib UUID - Project library COM id.
Generating new UUIDs
Click the Generate UUIDs button once and used the Buttons to save, generate, and re-build the project with the following steps:
Close all external editors - If you have any of the
project files open in any editor other then the current Torque Toolbox
(e.g., Visual Studio, Torsion, etc.), you need to close those out now.
Save - Click the Save to File button to save your changes to the webdeploy config file.
Generate - Click the Generate Source Project button. This step may take some time since it is updating several files.
Build - Click the Open Source Project button and select the version of Visual Studio you what to open your project in. Build the entire solution.
(click to enlarge)
Once Visual Studio has finished the build with no errors, return
to the Toolbox and close the Packaging Advanced Settings dialog to
return to the Package Project dialog.
Build Package
Now we're ready to build the project by clicking the Build button.
(click to enlarge)
This process may take some time but, if all goes well, at the end
you will get the Packaging Complete dialog with the option to Open
Folder for your finished project.
Testing locally
Before deploying to the World Wide Web, test the install locally.
Open up the web folder generated in the last step and open sample.html in your web browser.
(click to enlarge)
Clicking the link will download the project web plug-in installer.
(click to enlarge)
After you install your plug-in, your browser will run your project whenever you view the associated web page.
(click to enlarge)
Distributing from your website
Assuming you have a website, distributing your finished project is as
easy as uploading your files and making sure they have the correct
permissions set.
The following picture is an example of the web-based FTP utility at GoDaddy.com (not associated with GarageGames, please use whatever hosting solution you wish).
(click to enlarge)
Since every hosting provider manages their site differently, you will
need to check their documentation if you are having problems with
uploads or permissions.
Conclusion
So now that you've seen how easy it is to package your Torque3D
project for the web, you have a new option to distribute your next hit
game.