TGE Browser Plugin
by Neil Marshall · 05/29/2006 (1:34 pm) · 25 comments
The TGE Browser Plugin is finally at the point where you can actually use it. I might call it Alpha or Beta soon. I'm interested in hearing stories from people using it. If you are, let me know.


About the author
#2
05/29/2006 (2:05 pm)
Very cool :)
#3
Good work Neil!
hmm... just an idea... what about Mozilla inside Torque? ;)
And yeah, then - opening Torque in browser, and in game opening browser and then trying to open a web-page ... game inside browser that runs in game that runs in browser ;) lol
05/29/2006 (2:51 pm)
that could be useful for TGB (online) games!Good work Neil!
hmm... just an idea... what about Mozilla inside Torque? ;)
And yeah, then - opening Torque in browser, and in game opening browser and then trying to open a web-page ... game inside browser that runs in game that runs in browser ;) lol
#4
Do you have any scheme mapped out for an architecture similar to the shockwave 3d plug where you can download just data files (ie textures, dts, .dso, etc) and play on a generic engine? Also, have you approached any security issues (writing to the local drive, allowing access to just the serving domain)?
05/29/2006 (3:19 pm)
Again, excellent job on this! I consider this one of the best resources on the site. Keep it up!Do you have any scheme mapped out for an architecture similar to the shockwave 3d plug where you can download just data files (ie textures, dts, .dso, etc) and play on a generic engine? Also, have you approached any security issues (writing to the local drive, allowing access to just the serving domain)?
#5
05/29/2006 (3:30 pm)
I'm actually looking into getting it to download right now. As for the security, no I haven't looked into it yet. I think once I get the downloads running, then I'm going to have to think about that. I was thinking if the files are missing then I will check a whitelist on the users machine and look for the files on those servers. If the plugin is compiled specifically for your game the whitelist only needs to include one url so there shouldn't be much of a problem with that.
#6
05/30/2006 (3:20 pm)
This is really amazing. I've bookmarked this :)
#7
Shon Gale
[bold]theatomizer.com[/bold]
05/30/2006 (3:57 pm)
Excellent!! We at ATOMIX Productions have been following this closely and hope to move the wrapper to TSE. Question: will this handle multi-player mode. How cool to do multi-player in your browser.Shon Gale
[bold]theatomizer.com[/bold]
#8
05/30/2006 (4:38 pm)
Multiplayer is actually happening in that screenshot. The Firefox plugin is connected to the IE plugin using the standard method. As for TSE, it shouldn't be hard (I haven't looked into it at all) but I hear that there may be problems with the particle shutdown code because it's done slightly differently.
#9
06/01/2006 (11:44 am)
I realized that after I looked closely at the screenshot. Awesome work keep it up!!!
#10
np3DPlugin Error spawning 'c:\projects\tge14\tge14plugin\engine\out.plugin.release\bat000007.bat'.
np3DPluginFF Error spawning c:\projects\tge14\tge14plugin\engine\out.pluginff.release\bat00000d.bat'.
Any help would be appreciated!
06/01/2006 (11:46 pm)
Howdy! I followed the instructions on TDN for the directories etc. But I keep getting these errors:np3DPlugin Error spawning 'c:\projects\tge14\tge14plugin\engine\out.plugin.release\bat000007.bat'.
np3DPluginFF Error spawning c:\projects\tge14\tge14plugin\engine\out.pluginff.release\bat00000d.bat'.
Any help would be appreciated!
#11
I am using Firefox. I finally got the plugin compiled with a stock version of TGE, read the docs on TDN. The dual.html page doesn't work at all. It gives me the option to install the plugin at the top of the web page and when I click on it nothing happens. When I run the dualnp.html page I get a dialog box with the following error.
OpenGLDevice::setScreenMode
GetDC failed to get a valid device context!
The dialog then has 2 buttons (Retry) and (Cancel)
Also this new file appeared in the c:\program files\mozilla firefox\components\ directory named nsI3DPluginFF.xpt after I tried this but it makes no sense to me and maybe irrelevant.
I totally confess to not knowing what I'm doing. I have been programming for over 30 years, but no plug-in stuff. But I love it and want it to work.
I got the following from the compile. Does this mean I screwed up?
np3DPlugin Warnings and Error:
np3DPlugin warning LNK4197: export 'DllRegisterServer' specified multiple times; using first specification
np3DPlugin warning LNK4197: export 'DllUnregisterServer' specified multiple times; using first specification
np3DPlugin warning LNK4197: export 'DllGetClassObject' specified multiple times; using first specification
np3DPlugin warning LNK4197: export 'DllCanUnloadNow' specified multiple times; using first specification
np3DPlugin error PRJ0019: A tool returned an error code from "Copying Debug Plugin to Firefox"
np3DPluginFF compiled clean!!!!!
OK I'm also confused about the registry stuff from the web code files
This is the code from plugin.js
CLSID:6251CE4E-096D-40AC-9B95-A9A3E291C637
This is the code from dual.html
CLSID:6251CE4E-096D-40AC-9B95-A9A3E291C637
This is the code from dualnp.html
CLSID:720BFEEA-B020-4279-AA74-49BE2B461789
Do these need to be inserted somewhere?
06/02/2006 (12:06 pm)
Am I right to be posting here or is there another place? I like the blogs for announcements. But this is a resource and maybe we should have a page for it?????I am using Firefox. I finally got the plugin compiled with a stock version of TGE, read the docs on TDN. The dual.html page doesn't work at all. It gives me the option to install the plugin at the top of the web page and when I click on it nothing happens. When I run the dualnp.html page I get a dialog box with the following error.
OpenGLDevice::setScreenMode
GetDC failed to get a valid device context!
The dialog then has 2 buttons (Retry) and (Cancel)
Also this new file appeared in the c:\program files\mozilla firefox\components\ directory named nsI3DPluginFF.xpt after I tried this but it makes no sense to me and maybe irrelevant.
I totally confess to not knowing what I'm doing. I have been programming for over 30 years, but no plug-in stuff. But I love it and want it to work.
I got the following from the compile. Does this mean I screwed up?
np3DPlugin Warnings and Error:
np3DPlugin warning LNK4197: export 'DllRegisterServer' specified multiple times; using first specification
np3DPlugin warning LNK4197: export 'DllUnregisterServer' specified multiple times; using first specification
np3DPlugin warning LNK4197: export 'DllGetClassObject' specified multiple times; using first specification
np3DPlugin warning LNK4197: export 'DllCanUnloadNow' specified multiple times; using first specification
np3DPlugin error PRJ0019: A tool returned an error code from "Copying Debug Plugin to Firefox"
np3DPluginFF compiled clean!!!!!
OK I'm also confused about the registry stuff from the web code files
This is the code from plugin.js
CLSID:6251CE4E-096D-40AC-9B95-A9A3E291C637
This is the code from dual.html
CLSID:6251CE4E-096D-40AC-9B95-A9A3E291C637
This is the code from dualnp.html
CLSID:720BFEEA-B020-4279-AA74-49BE2B461789
Do these need to be inserted somewhere?
#12
The .xpt file is needed for scripting of plugins in Firefox. Right now nothing is scripted but it's there for future work. It's required because Java is no longer built into the web browser like it was in Netscape 4 (Thats why you always used to see "Loading Java..." when you launched a plugin and don't anymore.)
Ignore those DllRegister warnings. I have them on my build as well. I'll get rid of them one of these days.
The reason for the two different CLSID's is because dualnp.html is out of date. It's CLSID will eventually match the one in plugin.js.
The error in your compile looks like it's from the Custom Build Step general listing in the np3DPlugin properties page. You need to adjust the copy commands to copy to your Firefox directory. The CLSID's get automatically registered by the "Post-Build Event" code so you don't have to worry about that part. regsvr32 is for IE and the copy commands are for Firefox.
Also make sure you have the registry entry in there to point to the data files.
HKEY_LOCAL_MACHINE\SOFTWARE\TGE\main.cs c:\wherever\my\tge\example\is
If you come up with instructions that I missed on the TDN page, can you edit it to include them? (Just click edit at the top) I've installed it so many times now I'm never quite sure what I'm missing from the instructions.
06/02/2006 (12:29 pm)
The resource page for it is the TDN article.The .xpt file is needed for scripting of plugins in Firefox. Right now nothing is scripted but it's there for future work. It's required because Java is no longer built into the web browser like it was in Netscape 4 (Thats why you always used to see "Loading Java..." when you launched a plugin and don't anymore.)
Ignore those DllRegister warnings. I have them on my build as well. I'll get rid of them one of these days.
The reason for the two different CLSID's is because dualnp.html is out of date. It's CLSID will eventually match the one in plugin.js.
The error in your compile looks like it's from the Custom Build Step general listing in the np3DPlugin properties page. You need to adjust the copy commands to copy to your Firefox directory. The CLSID's get automatically registered by the "Post-Build Event" code so you don't have to worry about that part. regsvr32 is for IE and the copy commands are for Firefox.
Also make sure you have the registry entry in there to point to the data files.
HKEY_LOCAL_MACHINE\SOFTWARE\TGE\main.cs c:\wherever\my\tge\example\is
If you come up with instructions that I missed on the TDN page, can you edit it to include them? (Just click edit at the top) I've installed it so many times now I'm never quite sure what I'm missing from the instructions.
#13
OpenGLDevice::setScreenMode
GetDC failed to get a valid device context!
when I run the dualnp.html page and nothing happens when I load the dual.html page.
I edited the registry like you told me and it is loading but gives me that error.
Thanks
06/02/2006 (12:50 pm)
Neil thanks for getting back to me so soon. I understand what you're saying and that only leaves the issue of which web page to use and how to overcome the error on loading the plugin:OpenGLDevice::setScreenMode
GetDC failed to get a valid device context!
when I run the dualnp.html page and nothing happens when I load the dual.html page.
I edited the registry like you told me and it is loading but gives me that error.
Thanks
#14
Thanks!!!
06/04/2006 (12:07 pm)
Neil thanks for getting back to me. I resolved the problems and had a real eye opener, running everything in debug mode the plugin wouldn't work with our game. We found at the last minute one of our graphics was off and made it crash. But it worked perfectly on the TGE base engine and game. We have found it very easy to crash this engine in the past year. We have managed to crash it several times and have to go back to the drawing board and start over. This is awesome and we will post some screen shots for you guys later.Thanks!!!
#15
06/04/2006 (5:47 pm)
Cool!
#16
07/13/2006 (9:53 am)
NICE RESOURCE !! THANKS !!
#17
07/15/2006 (4:15 am)
Neil, I would love to hear that games created with TGB can also run in a web browser. For me, it is a deciding factor for using it for 2d casual web games.
#18
07/15/2006 (3:52 pm)
Shaun, thats simply a matter of porting the TGE code to TGB. I assume that the two executables are probably very similar with the initalization and paint routines but I don't own TGB (Only TGE, TLK, and TSE) so I can't do it. Someone else will have to do the porting.
#19
Thanks for your insight.
07/17/2006 (1:51 am)
Neil, your reply seems to give hope for at least that the porting should be reasonable (if one is as knowledgable in Torque architecture as yourself). In your experience with TGE, how many classes and/or methods did you change in order to "port" it over to be able to run in a web browser. If you could estimate, reflecting back to the process.Thanks for your insight.
#20
If you have access to TGE, download the plugin code from TDN and do a file compare using a program such as Beyond Compare to see where the changes were made. It colour codes the changes for you and makes it very easy to spot the differences.
07/17/2006 (2:32 am)
Most of the changes were in winWindow.cc/.h. There are some things here and there that would need to be changed but for the most part it would be there. I know there is one fix for the reload that I did that doesn't really fit well with TSE (Making sure that all the particles are unloaded from memory on shutdown) as someone has tried to port that fix already. I'm not sure if that part is different in TGB as well.If you have access to TGE, download the plugin code from TDN and do a file compare using a program such as Beyond Compare to see where the changes were made. It colour codes the changes for you and makes it very easy to spot the differences.
Torque Owner Tom Bushby