Game Development Community

Browser Plugin

by Kevin Bamonte · in Torque Game Engine · 04/23/2008 (1:08 pm) · 5 replies

Hi All,

Not sure if I'm posting in the right place ....

I found this resource on how to use TGE as a browser plugin, has anyone ever done this and got it working with TGE 1.5.2 ? I get lots of errors.

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10569

Is there another way to use TGE as a an activex browser plugin ?

Thanks in advance,

Kevin

#1
04/23/2008 (1:14 pm)
I've gotten the code working before. What errors are you getting?
#2
04/23/2008 (1:45 pm)
Thanks for the reply Scott,

Were you using 1.5.2 ? How did the plugin work for you ?


Here are the errors I encountered :

------ Build started: Project: np3DPlugin, Configuration: Debug Win32 ------

Compiling...
main.cc
\test\TGE_1_5_2\engine\game\main.cc(147) : error C2065: 'constructNewFont' : undeclared identifier
interiorInstance.cc
Deprecated: lightManager.h is deprecated and will be removed in the future. Replaced by lightingSystem/sgLightManager.h
\test\TGE_1_5_2\engine\interior\interiorInstance.cc(2174) : error C2039: 'surfaceZones' : is not a member of 'Interior'
..\engine\interior\interior.h(159) : see declaration of 'Interior'
\test\TGE_1_5_2\engine\interior\interiorInstance.cc(2174) : error C2228: left of '.size' must have class/struct/union type
\test\TGE_1_5_2\engine\interior\interiorInstance.cc(2175) : error C2039: 'surfaceZones' : is not a member of 'Interior'
..\engine\interior\interior.h(159) : see declaration of 'Interior'
interiorCollision.cc
\test\TGE_1_5_2\engine\interior\interiorCollision.cc(306) : error C2511: 'bool Interior::castRay_r(const U16,const U16,const Point3F &,const Point3F &,RayInfo *)' : overloaded member function not found in 'Interior'
..\engine\interior\interior.h(159) : see declaration of 'Interior'
\test\TGE_1_5_2\engine\interior\interiorCollision.cc(1106) : error C2511: 'void Interior::scanZone_r(const U16,const Point3F &,const Point3F &,const Point3F &,const Point3F &,U16 *,U32 *)' : overloaded member function not found in 'Interior'
..\engine\interior\interior.h(159) : see declaration of 'Interior'
unicode.cc
\test\TGE_1_5_2\engine\core\unicode.cc(202) : error C2556: 'const UTF16 *convertUTF8toUTF16(const UTF8 *)' : overloaded function differs only by return type from 'UTF16 *convertUTF8toUTF16(const UTF8 *)'
..\engine\core\unicode.h(44) : see declaration of 'convertUTF8toUTF16'
\test\TGE_1_5_2\engine\core\unicode.cc(202) : error C2373: 'convertUTF8toUTF16' : redefinition; different type modifiers
..\engine\core\unicode.h(44) : see declaration of 'convertUTF8toUTF16'
\test\TGE_1_5_2\engine\core\unicode.cc(224) : error C2556: 'const UTF32 *convertUTF8toUTF32(const UTF8 *)' : overloaded function differs only by return type from 'UTF32 *convertUTF8toUTF32(const UTF8 *)'
..\engine\core\unicode.h(45) : see declaration of 'convertUTF8toUTF32'
\test\TGE_1_5_2\engine\core\unicode.cc(224) : error C2373: 'convertUTF8toUTF32' : redefinition; different type modifiers
..\engine\core\unicode.h(45) : see declaration of 'convertUTF8toUTF32'
\test\TGE_1_5_2\engine\core\unicode.cc(247) : error C2556: 'const UTF8 *convertUTF16toUTF8(const UTF16 *)' : overloaded function differs only by return type from 'UTF8 *convertUTF16toUTF8(const UTF16 *)'
..\engine\core\unicode.h(47) : see declaration of 'convertUTF16toUTF8'
\test\TGE_1_5_2\engine\core\unicode.cc(247) : error C2373: 'convertUTF16toUTF8' : redefinition; different type modifiers
..\engine\core\unicode.h(47) : see declaration of 'convertUTF16toUTF8'
\test\TGE_1_5_2\engine\core\unicode.cc(269) : error C2556: 'const UTF32 *convertUTF16toUTF32(const UTF16 *)' : overloaded function differs only by return type from 'UTF32 *convertUTF16toUTF32(const UTF16 *)'
..\engine\core\unicode.h(48) : see declaration of 'convertUTF16toUTF32'
\test\TGE_1_5_2\engine\core\unicode.cc(269) : error C2373: 'convertUTF16toUTF32' : redefinition; different type modifiers
..\engine\core\unicode.h(48) : see declaration of 'convertUTF16toUTF32'
\test\TGE_1_5_2\engine\core\unicode.cc(291) : error C2556: 'const UTF8 *convertUTF32toUTF8(const UTF32 *)' : overloaded function differs only by return type from 'UTF8 *convertUTF32toUTF8(const UTF32 *)'
..\engine\core\unicode.h(50) : see declaration of 'convertUTF32toUTF8'
\test\TGE_1_5_2\engine\core\unicode.cc(291) : error C2373: 'convertUTF32toUTF8' : redefinition; different type modifiers
..\engine\core\unicode.h(50) : see declaration of 'convertUTF32toUTF8'
\test\TGE_1_5_2\engine\core\unicode.cc(313) : error C2556: 'const UTF16 *convertUTF32toUTF16(const UTF32 *)' : overloaded function differs only by return type from 'UTF16 *convertUTF32toUTF16(const UTF32 *)'
..\engine\core\unicode.h(51) : see declaration of 'convertUTF32toUTF16'
\test\TGE_1_5_2\engine\core\unicode.cc(313) : error C2373: 'convertUTF32toUTF16' : redefinition; different type modifiers
..\engine\core\unicode.h(51) : see declaration of 'convertUTF32toUTF16'

Build log was saved at "file://c:\test\Tge_1_5_2\engine\out.Plugin.Debug\\BuildLog.htm"
np3DPlugin - 18 error(s), 0 warning(s)



Thanks again,

Kevin
#3
04/23/2008 (3:25 pm)
Yeah, I used 1.5.2 when I played with it. Judging from the errors you posted I'd say the you probably accidentally overwrote something you shouldn't have when integrating it. If you just replaced the files that had to be modified with the ones from the resource then I could definitely see those errors happening.

You might want to try reintegrating a fresh copy. I recommend using a merge tool like WinMerge to see where all the differences are. I believe all the changes in the files were commented as being a change for the plugin. Stick to just merging in those changes and it should compile.
#4
04/23/2008 (6:37 pm)
I used this for quite a while, and even got it working on Mac OS X. However, in the end we abandoned it because it was too unstable. We just couldn't get it to run reliably on Firefox on Win32. Part of the problem is our game is played as short (2 min) matches, each of which required starting up and closing down the TGE Plugin. It was fine if you just started it once and ran it until you were ready to quit the browser, but that just wasn't practical for us.

By the way, it sounds like you are using old code. You should pull the 1.5 version from here:

tdn.garagegames.com/wiki/TGE/Code/How_to_make_torque_a_plugin
#5
04/24/2008 (6:40 am)
Thanks for the great info guys, that helps ALOT !

much appreciated Scott & Ed

Kevin