Changing the Web Plugin - Help from the experts?
by Brett Canter · in Torque 3D Professional · 12/09/2009 (12:32 pm) · 10 replies
Hey guys - David Montgomery-Blake recommended that I post this question to the forums. With any luck, Josh Engebretson might see it ... here's hoping!
I love T3D, however I am running into an issue with the web plugin. Currently the web plugin functions as such:
1 - User browses the web player for the first time
2 - The user clicks the graphic to install the web plugin
3 - A setup wizard is presented to the user upon clicking the install plugin graphic (and after a short download)
4 - User proceeds through the setup and finishes
5 - Game begins rendering within the browser
This process is not what our client wants, and to avoid having to switch to Unity3D, I am asking for a little assistance in changing the plugin's functionality somewhat. Our requirement for the plugin is that it makes the downloading and presentation as seamless as possible (ergo, no setup wizard). Unity's plugin works in this fashion, and I was hoping I could alter the T3D plugin to work in the same way. Basically, I just want to install the plugin to the browser (like any ActiveX control/plugin) and then the plugin begins downloading the game package. Upon completion, the game begins rendering inside the browser and the user never had to see a setup wizard.
Any thoughts as to where to start? I'm new to the plugin technology, thus the questions :) Any help gang?
Brett
I love T3D, however I am running into an issue with the web plugin. Currently the web plugin functions as such:
1 - User browses the web player for the first time
2 - The user clicks the graphic to install the web plugin
3 - A setup wizard is presented to the user upon clicking the install plugin graphic (and after a short download)
4 - User proceeds through the setup and finishes
5 - Game begins rendering within the browser
This process is not what our client wants, and to avoid having to switch to Unity3D, I am asking for a little assistance in changing the plugin's functionality somewhat. Our requirement for the plugin is that it makes the downloading and presentation as seamless as possible (ergo, no setup wizard). Unity's plugin works in this fashion, and I was hoping I could alter the T3D plugin to work in the same way. Basically, I just want to install the plugin to the browser (like any ActiveX control/plugin) and then the plugin begins downloading the game package. Upon completion, the game begins rendering inside the browser and the user never had to see a setup wizard.
Any thoughts as to where to start? I'm new to the plugin technology, thus the questions :) Any help gang?
Brett
#2
Here's the difference though (from Unity to T3D). Let's say I have 3 games that use the web player. For Unity, this means 1 setup wizard (for the web player) and all 3 games will automatically download and play. For T3D, this means 3 different setups before the games will render. I am fine with a one-time shot for setting up the web player, but a setup for each game is different. Is there a way to alter the T3D plugin to work in this fashion?
12/09/2009 (2:47 pm)
Thanks Josh!Here's the difference though (from Unity to T3D). Let's say I have 3 games that use the web player. For Unity, this means 1 setup wizard (for the web player) and all 3 games will automatically download and play. For T3D, this means 3 different setups before the games will render. I am fine with a one-time shot for setting up the web player, but a setup for each game is different. Is there a way to alter the T3D plugin to work in this fashion?
#3
12/10/2009 (7:22 am)
Look at this Dynamic Download; it is designed for such situation. I will come back in Q1 2010 with more information about it.
#4
04/28/2010 (10:11 am)
For clarification purposes, I was not speaking about the T3D web player plugin setup. I am speaking about the massive client install that is packaged into a setup and downloaded upon browsing the page. The Unity plugin will actually stream down the client install seamlessly, and the user never leaves the browser window.
#5
Think of it this way, the current way the T3D web plugin handles this is more or less the same as installing a game from a normal download. Just that instead of the windows installer you're using your web browser as an installer.
Unity is a framework that generates a simple binary which is then streamed to an indvidual web browser. This method also requires that said binary then has to go through an approval process. With out that approval process no AV would allow unity to run. Nor would anyone allow it to run because of the freedom a simple binary has on a system. Think McAfee's latest problem with actual malcious intent behind it.
Also GG does make a package similar to Unity called Instant Action but it is a seprate purchase.
---
What you are asking for is basically a frame work of reasources that each game could take advantage of. The complexities of how that might work is probably greater than most games you would create.
04/29/2010 (5:06 am)
*note this is just me para-phrasing prior threads asking for the same feature.Think of it this way, the current way the T3D web plugin handles this is more or less the same as installing a game from a normal download. Just that instead of the windows installer you're using your web browser as an installer.
Unity is a framework that generates a simple binary which is then streamed to an indvidual web browser. This method also requires that said binary then has to go through an approval process. With out that approval process no AV would allow unity to run. Nor would anyone allow it to run because of the freedom a simple binary has on a system. Think McAfee's latest problem with actual malcious intent behind it.
Also GG does make a package similar to Unity called Instant Action but it is a seprate purchase.
---
What you are asking for is basically a frame work of reasources that each game could take advantage of. The complexities of how that might work is probably greater than most games you would create.
#6
The fact that I think it's silly to download an entire game, run the game setup (although it's cleverly called a web setup, pshh!), and then use the browser to render is what's being lost here. If that's all that was intended, why even bother with it? That functionality is not earth shattering, not ground breaking, and frankly, underwhelming in it's entirety. Personally, I think the work Josh has done on the in-engine browser tech using QTWeb deserves the attention that the webplugin received. It's infinitely more useful, in my humble opinion.
OSAKit and Roozz are able to pull off what I need, and one of those products will get my attention for now. If/when the new InstantAction goes live, and they are inclined to answer an email once in awhile, I might go that route instead depending on cost. I like the idea of the new InstantAction approach, and it fits much better into the grand idea that is my game.
04/29/2010 (10:04 am)
Jacob, believe it or not, I'm now keenly aware of how the Torque3D plugin works (keyword *now* ha!). I was clarifying my statement because it seems Josh missed the meat of my question, due to my poor wording most likely. At any rate, I am fully aware of what the installer does, how it operates and what it's accomplishing.The fact that I think it's silly to download an entire game, run the game setup (although it's cleverly called a web setup, pshh!), and then use the browser to render is what's being lost here. If that's all that was intended, why even bother with it? That functionality is not earth shattering, not ground breaking, and frankly, underwhelming in it's entirety. Personally, I think the work Josh has done on the in-engine browser tech using QTWeb deserves the attention that the webplugin received. It's infinitely more useful, in my humble opinion.
OSAKit and Roozz are able to pull off what I need, and one of those products will get my attention for now. If/when the new InstantAction goes live, and they are inclined to answer an email once in awhile, I might go that route instead depending on cost. I like the idea of the new InstantAction approach, and it fits much better into the grand idea that is my game.
#7
Torque always supported multiple "games" (as long as they all use the same executable) in the same folder. Each "game" being just a bunch of scripts and art assets. Check the root main.cs file and what it does with the $userDirs variable for a good example of how to execute only specific folders of scripts.
04/29/2010 (12:45 pm)
Simple. Do not ship the graphics, sounds, models, etc with your plugin installer and use the cURL resource to make your game download those when it runs for the first time, displaying a progress bar in the meanwhile.Torque always supported multiple "games" (as long as they all use the same executable) in the same folder. Each "game" being just a bunch of scripts and art assets. Check the root main.cs file and what it does with the $userDirs variable for a good example of how to execute only specific folders of scripts.
#8
@Manoel - Your method works until you intend to roll out more games then the inital release. You could in therory then release a patch but you end up defeating one of the main strengths of web deployment. Unless you write a patching system... which would only take a few logical extensions to be true web deployment system. Abit with possible long download times.
04/30/2010 (4:44 am)
@Brett - I agree with you that it's underwhelming but what they were trying to accomplish is to push the idea of a Quake Live style game.@Manoel - Your method works until you intend to roll out more games then the inital release. You could in therory then release a patch but you end up defeating one of the main strengths of web deployment. Unless you write a patching system... which would only take a few logical extensions to be true web deployment system. Abit with possible long download times.
#9
The game itself is one single big DLL. Both the plugin and EXE are simple wrappers which load that DLL. You could, in theory, make your plugin be able to load different DLLs based on parameters received from the HTML. Check <PROJECT NAME>\web\source\common\WebCommon.cpp. Right now it checks the plugin DLL name, strips "plugin" off it then loads it as the game DLL.
However, there is a strong reason why the plugin loads a hardcoded DLL, instead of taking one as a parameter: security. Being able to load whatever DLL the HTML says so might open up the path for security issues. So, if you modify your plugin to be able to load different game DLLs, make sure you implement some safety measures:
- Only load DLLs from the same folder as the plugin (or from folders inside the plugin install directory).
- Implement some signature checking in your game DLLs (that's pretty much what Instant Action does). If possible, implement actual binary file signing using VeriSign signatures for maximum reliability (and to get the users' trust).
Ah, and having a single plugin that loads all Torque games will *never* be a default feature, because a single plugin that is capable of loading and executing arbitrary DLLs compiled by anyone with the Torque SDK would end up in anti-virus blacklists in a matter of days. InstantAction works because each developer must sign contracts with IA to get a digital certificate for their games and go through procedures that ensure their games don't contain malicious code. With the T3D SDK this is not possible.
04/30/2010 (5:29 am)
@Jacob: if you intend to deploys different binaries, then it should be possible with some modifications.The game itself is one single big DLL. Both the plugin and EXE are simple wrappers which load that DLL. You could, in theory, make your plugin be able to load different DLLs based on parameters received from the HTML. Check <PROJECT NAME>\web\source\common\WebCommon.cpp. Right now it checks the plugin DLL name, strips "plugin" off it then loads it as the game DLL.
However, there is a strong reason why the plugin loads a hardcoded DLL, instead of taking one as a parameter: security. Being able to load whatever DLL the HTML says so might open up the path for security issues. So, if you modify your plugin to be able to load different game DLLs, make sure you implement some safety measures:
- Only load DLLs from the same folder as the plugin (or from folders inside the plugin install directory).
- Implement some signature checking in your game DLLs (that's pretty much what Instant Action does). If possible, implement actual binary file signing using VeriSign signatures for maximum reliability (and to get the users' trust).
Ah, and having a single plugin that loads all Torque games will *never* be a default feature, because a single plugin that is capable of loading and executing arbitrary DLLs compiled by anyone with the Torque SDK would end up in anti-virus blacklists in a matter of days. InstantAction works because each developer must sign contracts with IA to get a digital certificate for their games and go through procedures that ensure their games don't contain malicious code. With the T3D SDK this is not possible.
#10
Inventive method and it does solve most of the issues with Torque's current web deployment.
04/30/2010 (10:54 am)
I hadn't thought of having the web site load indvidual DLL's, I consider myself schooled.Inventive method and it does solve most of the issues with Torque's current web deployment.
Associate Josh Engebretson
If you want to solely target ActiveX, it is possible to launch a signed installer cab for a plugin. This method isn't specific to Torque 3D.